Commit Graph

90261 Commits

Author SHA1 Message Date
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
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
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
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
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
32409ab4c5 [libFuzzer] add a driver file to use AFL on LLVMFuzzerTestOneInput
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269141 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 23:46:50 +00:00
Mike Aizatsky
0d68393b0f [libfuzzer] Refactoring coverage state-management code.
It is now less state-dependent and will allow easier comparing of
coverages of different units.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269140 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 23:43:15 +00:00
Easwaran Raman
d56f6d6de3 Revert r269131
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269138 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 23:26:04 +00:00
Dehao Chen
b1ff2765a3 Propagate branch metadata when some branch probability is missing.
Summary: In sample profile, some branches may have profile missing due to profile inaccuracy. We want existing branch probability still valid after propagation.

Reviewers: hfinkel, davidxl, spatel

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269137 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 23:07:19 +00:00
Justin Bogner
182dac04e5 SDAG: Make SelectCodeCommon return void
This means SelectCode unconditionally returns nullptr now. I'll follow
up with a change to make that return void as well, but it seems best
to keep that one very mechanical.

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@269136 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 22:58:26 +00:00
Tim Northover
dc566822d4 AArch64: allow vN to represent 64-bit registers in inline asm.
Unlike xN/wN, the size of vN is genuinely ambiguous in the assembly, so we
should try to infer what was intended from the type. But only down to 64-bits
(vN can never represent sN, hN or bN).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269132 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 22:26:45 +00:00
Easwaran Raman
79f2742cf7 Reapply r266477 and r266488
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269131 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 22:03:23 +00:00
Xinliang David Li
e052ee9da4 [PM]: port IR based profUse pass to new pass manager
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269129 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 21:59:52 +00:00
Tim Northover
0d5b5cf764 Revert "MemCpyOpt: combine local load/store sequences into memcpy."
This reverts commit r269125. It was in my tree when I ran "git svn dcommit".
It's really still under review.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269127 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 21:49:40 +00:00
Tim Northover
946a2f08b8 ARM: report an error when attempting to target a misalgined BLX
The CodeGen problem was fixed in r269101, but we still miscompiled assembly
that tried the same thing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269126 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 21:48:48 +00:00
Tim Northover
654d431cf9 MemCpyOpt: combine local load/store sequences into memcpy.
Sort of the BB-local equivalent to idiom-recognizer: if we have a basic-block
that really implements a memcpy operation, backends can benefit from seeing
this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269125 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 21:48:11 +00:00
Hans Wennborg
9ee5a28c8c Loop unroller: set thresholds for optsize and minsize functions to zero
Before r268509, Clang would disable the loop unroll pass when optimizing
for size. That commit enabled it to be able to support unroll pragmas
in -Os builds. However, this regressed binary size in one of Chromium's
DLLs with ~100 KB.

This restores the original behaviour of no unrolling at -Os, but doing it
in LLVM instead of Clang makes more sense, and also allows the pragmas to
keep working.

Differential revision: http://reviews.llvm.org/D20115

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269124 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 21:45:55 +00:00
Lawrence Hu
08074bbc31 Enable loopreroll for sext of loop control only IV
This patch extend loopreroll to allow the instruction chain
        of loop control only IV has sext.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269121 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 21:16:49 +00:00
Justin Bogner
c5126054e3 SDAG: Avoid relying on the return value of SelectCode in SystemZ. NFC
This is a bit of a spot fix for now. I'll try to fix this up more
comprehensively soon.

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@269120 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 21:11:26 +00:00
Lawrence Hu
0b382412f7 Revert r26084: Enable loopreroll for sext of loop control only IV
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269119 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 21:11:09 +00:00
Quentin Colombet
5e0f621a7b [X86] Properly check that EAX is dead when copying EFLAGS.
This fixes a bug introduced in r267623, where we got smarter and avoided to save
EAX before using it. However, we failed to check if any of the subregister of
EAX were alive and thus, missed cases where we have to save EAX before using it.

The problem may happen on every X86/i386/... platform.

This fixes llvm.org/PR27624


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269115 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 20:49:46 +00:00