131925 Commits

Author SHA1 Message Date
Chris Bieneman
bf924c1084 Initial add for MachO support for obj2yaml
Adding the initial files for adding MachO support to obj2yaml. Passing a MachO file will result in a new not_implemented error.

I will be implementing obj2yaml and yaml2obj for MachO in parallel so that one can be used to test the other.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269243 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 22:07:45 +00:00
Sanjay Patel
0dc2e08e23 regenerate checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269241 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 21:51:28 +00:00
Matthias Braun
1e2567525e MachineVerifier: Fix error reporting.
Do not use getVRegDef() to print "the definition" of a vreg. If there
are multiple or none the function will fail.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269239 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 21:31:39 +00:00
Xinliang David Li
b723fcf640 cleanup: do not recompute size for preallocated buffer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269238 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 21:17:10 +00:00
Justin Bogner
e819b3304b SDAG: Add a helper to replace and remove a node during ISel
It's very common to want to replace a node and then remove it since
it's dead, especially as we port backends from the SDNode *Select API
to the void Select one. This helper makes this sequence a bit less
verbose.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269236 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 21:13:17 +00:00
Justin Bogner
cefd2c3002 SDAG: Have SelectNodeTo replace uses if it CSE's instead of morphing a node
It's awkward to force callers of SelectNodeTo to figure out whether
the node was morphed or CSE'd. Update uses here instead of requiring
callers to (sometimes) do it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269235 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 21:00:33 +00:00
Teresa Johnson
52af319151 [ThinLTO] Fix Windows debug failure in new iterator
This fixes a debug assert on Windows from the new iterator
implementation added in r269059. The Windows std::vector iterator
operator== checks in debug mode that the containers being iterated over
are the same, which they may not be.

Fixed by checking that we are iterating over the same container before
comparing the container iterators.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269232 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 20:46:22 +00:00
Chad Rosier
fea2d4d86c [AArch64] Improve getUsefulBitsForUse for narrow stores.
For narrow stores (e.g., strb, srth) we know the upper bits of the register are
unused/not useful. In some cases we can use this information to eliminate
unnecessary instructions.

For example, without this patch we generate (from the 2nd test case):

 ldr w8, [x0]
 and w8, w8, #0xfff0
 bfxil w8, w2, #16, #4
 strh w8, [x1]

and after the patch the 'and' is removed:

 ldr w8, [x0]
 bfxil w8, w2, #16, #4
 strh w8, [x1]
 ret

During the lowering of the bitfield insert instruction the 'and' is eliminated
because we know the upper 16-bits that are masked off are unused and the lower
4-bits that are masked off are overwritten by the insert itself. Therefore, the
'and' is unnecessary.

Differential Revision: http://reviews.llvm.org/D20175

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269226 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 20:19:54 +00:00
Sanjay Patel
678ba5a117 fix documentation comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269225 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 20:10:33 +00:00
Vedant Kumar
6d6b3df09a [ProfileData] Use SoftInstrProfErrors to count soft errors, NFC
Differential Revision: http://reviews.llvm.org/D20082

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269222 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 19:42:19 +00:00
Simon Pilgrim
5009e4f85f [X86][AVX512] Fixed VPERMILPD/VPERMILPS shuffle comments.
Fixed incorrect operands indices used to access src registers

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269221 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 18:53:44 +00:00
Rafael Espindola
e973d3f2ce Return a StringRef from getSection.
This is similar to how getName is handled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269218 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 18:21:59 +00:00
Zachary Turner
6c85d0113d Fix build breakage in DebugInfoCodeview
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269217 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 17:54:20 +00:00
Zachary Turner
f76064565f Refactor CodeView type records to use common code.
Differential Revision: http://reviews.llvm.org/D20138
Reviewed By: rnk

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269216 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 17:47:35 +00:00
Justin Bogner
41f296b5d3 SDAG: Minor cleanup in X86
Don't bother returning a result we don't use here. I've also renamed
this from selectGather to tryGather to better indicate that it may not
do anything.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269215 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 17:46:03 +00:00
Sanjoy Das
2731c7a952 [SCEVExpander] Fix a failed cast<> assertion
SCEVExpander::replaceCongruentIVs assumes the backedge value of an
SCEV-analysable PHI to always be an instruction, when this is not
necessarily true.  For now address this by bailing out of the
optimization if the backedge value of the PHI is a non-Instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269213 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 17:41:41 +00:00
Sanjoy Das
5bbe5abe5e [SCEVExpander] Don't break SSA in replaceCongruentIVs
`SCEVExpander::replaceCongruentIVs` bypasses `hoistIVInc` if both the
original and the isomorphic increments are PHI nodes.  Doing this can
break SSA if the isomorphic increment is not dominated by the original
increment.  Get rid of the bypass, and let `hoistIVInc` do the right
thing.

Fixes PR27232 (compile time crash/hang).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269212 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 17:41:34 +00:00
Sanjoy Das
836f35c484 [SCEV] Be more aggressive around proving no-wrap
... for AddRec's in loops for which SCEV is unable to compute a max
tripcount.  This is not a problem for "normal" loops[0] that don't have
guards or assumes, but helps in cases where we have guards or assumes in
the loop that can be used to constrain incoming values over the backedge.

This partially fixes PR27691 (we still don't handle the NUW case).

[0]: for "normal" loops, in the cases where we'd be able to prove
no-wrap via isKnownPredicate, we'd also be able to compute a max
tripcount.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269211 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 17:41:26 +00:00
Simon Pilgrim
5c4ef289a9 [X86][SSE] Avoid repeatedly calling MCInst::getNumOperands(). NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269209 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 17:36:32 +00:00
Jan Vesely
a836e3c43c AMDGPU: Split private memory tests
Reenable R600 testing

reviewer: arsenm

Differential Revision: http://reviews.llvm.org/D20031

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269207 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 17:24:45 +00:00
Sanjay Patel
e5219da65d fix typos in comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269206 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 17:00:07 +00:00
Filipe Cabecinhas
3e915294ae [NFC] Remove some dead code:
DbgInfoIntrinsic::StripCast() is dead since r79977
The only function that creates Comdat objects seems to be in Module, and always creates them using the default constructor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269204 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 16:38:40 +00:00
Dan Gohman
9cc168109a [WebAssembl] Implement enough of fast-isel to run the comparison tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269203 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 16:32:42 +00:00
Vedant Kumar
412cddb08e Use an emplace_back for consistency, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269199 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 16:03:02 +00:00
Vedant Kumar
0a0124375c [BasicAA] Compare GEP indices based on value (Fix PR27418)
Equivalent GEP indices with different types are treated as different
indices altogether, leading to an incorrect AA result. Fix the issue
by comparing indices based on their values.

Thanks to Mikael Holmén for reporting the issue!

Differential Revision: http://reviews.llvm.org/D19935

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269197 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 15:45:43 +00:00
Daniel Sanders
2922c601c3 [mips][ias] Work around incorrect microMIPS relocation evaluation exposed by r268900
microMIPS has a special case that is not correctly implemented in LLVM. If we
have a symbol 'foo' which is equivalent to '.text+0x10'. The value of an
R_MICROMIPS_LO16 relocation using 'foo' is 'foo+0x11' and not 'foo+0x10'. The
in-place addend should therefore be 0x11.

Work around this by partially reverting the effect of r268900 by keeping the
symbol when the STO_MIPS_MICROMIPS flag is set. This fixes
SingleSource/Regression/C/PR640 for microMIPS.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269196 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 15:44:23 +00:00
Simon Pilgrim
ab00bc3035 [X86][AVX512] Regenerate intrinsics test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269193 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 15:13:29 +00:00
Krzysztof Parzyszek
fcef736eb0 [Hexagon] Add a debug option to disable all backend optimizations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269192 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 15:01:30 +00:00
Krzysztof Parzyszek
1c156dfdcb [Hexagon] Use offsets relative to FP+8 in .cfi_offset instructions
When generating .cfi_offset instructions, make sure that the offset is
calculated with respect to the register used to define the CFA (which is
currently always FP+8).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269191 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 14:53:07 +00:00
Artur Pilipenko
f20a7ef4cf NFC. Introduce Value::isPointerDereferenceable
Extract a part of isDereferenceableAndAlignedPointer functionality to Value:
    
Reviewed By: hfinkel, sanjoy
    
Differential Revision: http://reviews.llvm.org/D17611


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269190 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 14:43:28 +00:00
Rafael Espindola
d8ec30396a Merge two unreachable cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269189 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 14:41:30 +00:00
Simon Pilgrim
b78951b109 [X86] Regenerate shuffle test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269186 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 13:57:15 +00:00
Rafael Espindola
06d92089dd Refactor duplicated check for valid declaration linkage. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269184 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 13:51:39 +00:00
Rafael Espindola
d9f2fdcea9 Delete duplicated verifier test.
Also add unittest to show we still detect the errors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269182 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 13:23:52 +00:00
Daniel Sanders
0eaaf930a0 [mips][ias] Fix missing header that should have been in r269179
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269180 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 13:04:22 +00:00
Daniel Sanders
46a5550f61 [mips][ias] Fix N32 and N64 .cprestore directive when inside .set noat region.
Summary:
r268058 unintentionally made the retrieval of the current assembler temporary
unconditional. This was fine for the existing tests but it broke the cases
where the assembler temporary is not needed (N32/N64 or not PIC) and is
unavailable due to a '.set noat' directive.

This fixes FreeBSD's libc.

Reviewers: emaste, sdardis, seanbruno

Subscribers: dsanders, emaste, sdardis, llvm-commits

Differential Revision: http://reviews.llvm.org/D20093


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269179 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 12:48:19 +00:00
Rafael Espindola
853d0da1b5 Try to fix a msvc warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269178 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 12:37:16 +00:00
Hrvoje Varga
eef2fa80b4 [mips][microMIPS] Implement CFC*, CTC* and LDC* instructions
Differential Revision: http://reviews.llvm.org/D19713


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269176 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 12:12:24 +00:00
Rafael Espindola
aa838c716c clang-format LLToken.h.
Having it be special is quite annoying for being able to just run
git-clang-format in patches that change it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269175 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 12:07:32 +00:00
Simon Pilgrim
cfd2a271ad [X86][AVX512] Updated shuffle comments instruction macros to split writemask instructions. NFC
This will make it easier to support the different writemask cases in shuffle comments

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269174 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 11:55:12 +00:00
Hrvoje Varga
d187959ecd [mips][micromips] Implement DSBH, DSHD, DSLL, DSLL32, DSLLV, DSRA, DSRA32 and DSRAV instructions
Differential Revision: http://reviews.llvm.org/D16800


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269169 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 11:17:04 +00:00
Chris Lattner
c8eaae6e70 Most common problem is that I get md5 hashes, not crypt hashes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269157 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 03:47:36 +00:00
Rafael Espindola
fd8a750b72 Replace PrintLinkage with getLinkagePrintName. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269155 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 01:45:31 +00:00
Weiming Zhao
daccc21594 [AArch64] Fix DAG selection for cmps for fp16 type
Summary: When emitting comparison for fp16, in addition to promote the LHS and RHS to fp32, we need to change the VT as well.

Reviewers: t.p.northover

Subscribers: t.p.northover, aemerson, rengolin, llvm-commits

Differential Revision: http://reviews.llvm.org/D19922

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269151 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 01:26:32 +00:00
Rafael Espindola
4ff35c4e0f Delete mayBeOverridden.
It is the same as isInterposable which seems to be the preferred name.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269150 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 01:26:06 +00:00
Matt Arsenault
da4b82ab13 AMDGPU: Make some instructions convergent
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269147 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 00:32:31 +00:00
Rong Xu
d8cfa0ffc7 [PGO] Use WeakAny linkage for __llvm_profile_raw_version
Use WeakAny linkage instead of LinkOnceAny, as the symbol can be removed with
LinkOnceAny in O2 (not referenced).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269146 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 00:31:59 +00:00
Matt Arsenault
3e43181f87 AMDGPU: Change private_element_size to 4
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269145 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 00:28:54 +00:00
Justin Bogner
f9c8d732b9 SDAG: Implement Select instead of SelectImpl in X86
This is part of the work to have Select return void instead of an
SDNode *, which is in turn part of llvm.org/pr26808.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269144 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 23:55:37 +00:00
Kostya Serebryany
2ec40a608f [libFuzzer] mention the AFL driver in the docs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269143 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 23:52:47 +00:00