OSDN Git Service
Krzysztof Parzyszek [Wed, 20 Apr 2016 14:33:23 +0000 (14:33 +0000)]
[RDF] Consider register as live if any alias is live
This only affects the recomputation of kill flags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266875
91177308-0d34-0410-b5e6-
96231b3b80d8
Zoran Jovanovic [Wed, 20 Apr 2016 14:07:46 +0000 (14:07 +0000)]
[mips][microMIPS] Implement BGEC, BGEUC, BLTC, BLTUC, BEQC and BNEC instructions
Differential Revision: http://reviews.llvm.org/D14206
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266873
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Wed, 20 Apr 2016 13:18:47 +0000 (13:18 +0000)]
Revert "[gold-plugin] Disable name for values other than GlobalValue"
This reverts commit r266871. Setting the default based on the NDEBUG
flag is causing test failures. Need to figure out whether to change this
approach or update tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266872
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Wed, 20 Apr 2016 13:01:37 +0000 (13:01 +0000)]
[gold-plugin] Disable name for values other than GlobalValue
Summary:
Applies Mehdi's optimization (r263086) to disable value names other than
for GlobalValues to LTO/ThinLTO performed via the gold-plugin, in the
same manner as it is applied in libLTO.
Reviewers: rafael, joker-eph
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D19269
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266871
91177308-0d34-0410-b5e6-
96231b3b80d8
Nikolay Haustov [Wed, 20 Apr 2016 09:34:48 +0000 (09:34 +0000)]
AMDGPU/SI: Assembler: improvements to support trap handlers.
Add ParseAMDGPURegister which can be invoked recursively for parsing lists.
Rename getRegForName to getSpecialRegForName.
Support legacy SP3 register list syntax: [s2,s3,s4,s5] or [flat_scratch_lo,flat_scratch_hi].
Add 64-bit registers TBA, TMA where missing.
Add some tests.
Differential Revision: http://reviews.llvm.org/D19163
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266865
91177308-0d34-0410-b5e6-
96231b3b80d8
Asaf Badouh [Wed, 20 Apr 2016 08:32:57 +0000 (08:32 +0000)]
[X86] enable PIE for functions
Call locally defined function directly for PIE/fPIE
Differential Revision: http://reviews.llvm.org/D19226
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266863
91177308-0d34-0410-b5e6-
96231b3b80d8
Hrvoje Varga [Wed, 20 Apr 2016 06:34:48 +0000 (06:34 +0000)]
[mips][microMIPS]Implement CFC*, CTC* and LDC* instructions
Differential Revision: http://reviews.llvm.org/D18640
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266861
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 20 Apr 2016 05:19:01 +0000 (05:19 +0000)]
[AVX512] Add avx512cd+vl runs to vector-tzcnt-128/256 tests to show using the vplzcntd/q instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266860
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 20 Apr 2016 05:18:58 +0000 (05:18 +0000)]
[AVX512] Update vector-tzcnt-512 test to show how bad v32i16 and v64i8 is with avx512bw enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266859
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 20 Apr 2016 05:18:55 +0000 (05:18 +0000)]
[AVX512] Add popcount support for v32i16 and v64i8.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266858
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Wed, 20 Apr 2016 04:18:11 +0000 (04:18 +0000)]
ThinLTO: never promote as external weak
This linkage is *not* intended to express that a declaration refers
to a weak symbol, but that the symbol might not be present at link
time. I don't believe it was the intent.
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266856
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Wed, 20 Apr 2016 04:17:36 +0000 (04:17 +0000)]
FunctionImport: make sure we always select the right callee in presence of alias
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266854
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 20 Apr 2016 01:57:44 +0000 (01:57 +0000)]
[X86] Mark some floating point operations that are always expanded for vector types as Expand in a floating point only loop instead of looping through all vector types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266850
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 20 Apr 2016 01:57:42 +0000 (01:57 +0000)]
[X86] Don't mark vector loads and shifts Expand in advance. Loads are always marked Legal or Promote for all the legal types later. Shifts are always marked custom. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266849
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 20 Apr 2016 01:57:40 +0000 (01:57 +0000)]
[X86] Merge the two different SSE2 blocks in the X86TargetLowering constructor. Also qualfiy the XOP block with !useSoftFloat to match the other vector blocks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266848
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 20 Apr 2016 01:57:38 +0000 (01:57 +0000)]
[X86] Don't set vector FADD,FSUB,FMUL,FDIV,FNEG,FSQRT to Expand early. For every legal FP type we either set them to Legal or Custom anyway. So let them stay defaulted to Legal and only change when they need to be Custom.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266847
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Wed, 20 Apr 2016 01:04:26 +0000 (01:04 +0000)]
llvm-lto: run the module verifier when doing IR level work
It seems it was only running during CodeGen previously.
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266846
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Wed, 20 Apr 2016 01:04:20 +0000 (01:04 +0000)]
ThinLTO: Move alias importing decision on the summary
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266845
91177308-0d34-0410-b5e6-
96231b3b80d8
Marcin Koscielnicki [Wed, 20 Apr 2016 01:03:48 +0000 (01:03 +0000)]
[SystemZ] Add support for llvm.thread.pointer intrinsic.
Differential Revision: http://reviews.llvm.org/D19054
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266844
91177308-0d34-0410-b5e6-
96231b3b80d8
Amaury Sechet [Wed, 20 Apr 2016 01:02:12 +0000 (01:02 +0000)]
Add LLVMGetAttrKindID in the C API in order to facilitate migration away from LLVMAttribute
Summary:
LLVMAttribute has outlived its utility and is becoming a problem for C API users that what to use all the LLVM attributes. In order to help moving away from LLVMAttribute in a smooth manner, this diff introduce LLVMGetAttrKindIDInContext, which can be used instead of the enum values.
See D18749 for reference.
Reviewers: Wallbraker, whitequark, joker.eph, echristo, rafael
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D19081
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266842
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 20 Apr 2016 00:55:38 +0000 (00:55 +0000)]
MipsAsmParser::loadImmediate(): Prune an obsolete \param in r266602. [-Wdocumentation]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266841
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Wed, 20 Apr 2016 00:29:48 +0000 (00:29 +0000)]
IR: Use HANDLE_METADATA_LEAF to define MetadataKind enum, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266839
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Wed, 20 Apr 2016 00:24:21 +0000 (00:24 +0000)]
[libFuzzer] added -detect_leaks flag (0 by default for now). When enabled, it will help finding leaks while fuzzing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266838
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Wed, 20 Apr 2016 00:21:24 +0000 (00:21 +0000)]
ScoreboardHazardRecognizer: unbreak TSAN by moving a static mutated variable to a member
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266837
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 19 Apr 2016 23:59:13 +0000 (23:59 +0000)]
IR: Use std::vector instead of SmallPtrSet for distinct nodes, NFC
We never use the set-ness of SmallPtrSet for distinct nodes. Eventually
we may start garbage-collecting or reference-counting nodes (in which
cases we'd want to remove things from this collection, and a fast erase
would be valuable), but in the meantime a vector is sufficient.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266835
91177308-0d34-0410-b5e6-
96231b3b80d8
Mandeep Singh Grang [Tue, 19 Apr 2016 23:51:52 +0000 (23:51 +0000)]
[LLVM] Remove unwanted --check-prefix=CHECK from unit tests. NFC.
Summary: Removed unwanted --check-prefix=CHECK from numerous unit tests.
Reviewers: t.p.northover, dblaikie, uweigand, MatzeB, tstellarAMD, mcrosier
Subscribers: mcrosier, dsanders
Differential Revision: http://reviews.llvm.org/D19279
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266834
91177308-0d34-0410-b5e6-
96231b3b80d8
Marcin Koscielnicki [Tue, 19 Apr 2016 23:46:59 +0000 (23:46 +0000)]
[Mips] [MSan] VarArgMIPS64Helper: Use target's endian, not host's.
Ugh.
Differential Revision: http://reviews.llvm.org/D19292
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266833
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Tue, 19 Apr 2016 22:37:44 +0000 (22:37 +0000)]
[libFuzzer] more trophies
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266830
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 19 Apr 2016 22:25:02 +0000 (22:25 +0000)]
ARM: fix assertion failure on -O0 cmpxchg.
Because lowering of CMP_SWAP_64 occurs during type legalization, there can be
i64 types produced by more than just a BUILD_PAIR or similar. My initial tests
used just incoming function args.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266828
91177308-0d34-0410-b5e6-
96231b3b80d8
Nicolai Haehnle [Tue, 19 Apr 2016 21:58:33 +0000 (21:58 +0000)]
Add IntrWrite[Arg]Mem intrinsic property
Summary:
This property is used to mark an intrinsic that only writes to memory, but
neither reads from memory nor has other side effects.
An example where this is useful is the llvm.amdgcn.buffer.store.format.*
intrinsic, which corresponds to a store instruction that goes through a special
buffer descriptor rather than through a plain pointer.
With this property, the intrinsic should still be handled as having side
effects at the LLVM IR level, but machine scheduling can make smarter
decisions.
Reviewers: tstellarAMD, arsenm, joker.eph, reames
Subscribers: arsenm, llvm-commits
Differential Revision: http://reviews.llvm.org/D18291
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266826
91177308-0d34-0410-b5e6-
96231b3b80d8
Nicolai Haehnle [Tue, 19 Apr 2016 21:58:22 +0000 (21:58 +0000)]
AMDGPU: Guard VOPC instructions against incorrect commute
Summary:
The added testcase, which triggered this, was derived from a shader-db case
via bugpoint. A separate question is why scalar branching wasn't used.
Reviewers: arsenm, tstellarAMD
Subscribers: arsenm, llvm-commits
Differential Revision: http://reviews.llvm.org/D19208
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266825
91177308-0d34-0410-b5e6-
96231b3b80d8
Nicolai Haehnle [Tue, 19 Apr 2016 21:58:17 +0000 (21:58 +0000)]
AMDGPU/SI: SGPR accounting in getSIProgramInfo must ignore exec_lo/hi
Summary:
A shader stored the live mask (initial exec mask) in an SGPR which was then
spilled during register allocation. The allocator quite reasonably
optimized turned the spill into
v_writelane_b32 %vgpr, exec_lo, N
v_writelane_b32 %vgpr, exec_hi, N+1
at the beginning of the shader, confusing the SGPR accounting.
No test case, because si-sgpr-spill.ll together with an upcoming patch for
WQM handling exhibits the problem.
Reviewers: arsenm, tstellarAMD
Subscribers: arsenm, llvm-commits
Differential Revision: http://reviews.llvm.org/D19199
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266824
91177308-0d34-0410-b5e6-
96231b3b80d8
Nicolai Haehnle [Tue, 19 Apr 2016 21:58:10 +0000 (21:58 +0000)]
[TableGen] Make an error message slightly more informative
Reviewers: ab, spop, stoklund
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D19192
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266823
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Tue, 19 Apr 2016 21:55:14 +0000 (21:55 +0000)]
Remove duplicated header contents, NFC
It looks like InstrProfiling.h was the victim of a bad merge. The header
guards in the file prevented the build from blowing up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266822
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Tue, 19 Apr 2016 21:36:24 +0000 (21:36 +0000)]
[Hexagon] Fix operand swapping in HexagonPeephole
Also, disable zero- and size-extend optimizations for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266821
91177308-0d34-0410-b5e6-
96231b3b80d8
Marcin Koscielnicki [Tue, 19 Apr 2016 20:51:05 +0000 (20:51 +0000)]
[AArch64] [ARM] Make a target-independent llvm.thread.pointer intrinsic.
Both AArch64 and ARM support llvm.<arch>.thread.pointer intrinsics that
just return the thread pointer. I have a pending patch that does the same
for SystemZ (D19054), and there are many more targets that could benefit
from one.
This patch merges the ARM and AArch64 intrinsics into a single target
independent one that will also be used by subsequent targets.
Differential Revision: http://reviews.llvm.org/D19098
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266818
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 19 Apr 2016 20:22:50 +0000 (20:22 +0000)]
[Orc] Add move ops for OrcRemoteTargetClient and OrcRemoteTargetServer to
appease MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266812
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Tue, 19 Apr 2016 20:20:33 +0000 (20:20 +0000)]
[Hexagon] Fix printing the address operand of S2_storerinewabs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266811
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Shen [Tue, 19 Apr 2016 20:14:52 +0000 (20:14 +0000)]
[PPC, SSP] Support PowerPC Linux stack protection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266809
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Shen [Tue, 19 Apr 2016 19:40:37 +0000 (19:40 +0000)]
[SSP, 2/2] Create llvm.stackguard() intrinsic and lower it to LOAD_STACK_GUARD
With this change, ideally IR pass can always generate llvm.stackguard
call to get the stack guard; but for now there are still IR form stack
guard customizations around (see getIRStackGuard()). Future SSP
customization should go through LOAD_STACK_GUARD.
There is a behavior change: stack guard values are not CSEed anymore,
since we should never reuse the value in case that it has been spilled (and
corrupted). See ssp-guard-spill.ll. This also cause the change of stack
size and codegen in X86 and AArch64 test cases.
Ideally we'd like to know if the guard created in llvm.stackprotector() gets
spilled or not. If the value is spilled, discard the value and reload
stack guard; otherwise reuse the value. This can be done by teaching
register allocator to know how to rematerialize LOAD_STACK_GUARD and
force a rematerialization (which seems hard), or check for spilling in
expandPostRAPseudo. It only makes sense when the stack guard is a global
variable, which requires more instructions to load. Anyway, this seems to go out
of the scope of the current patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266806
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 19 Apr 2016 19:35:16 +0000 (19:35 +0000)]
[Orc] Add explicit move ops to OrcRemoteTargetRPCAPI for MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266805
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 19 Apr 2016 19:34:46 +0000 (19:34 +0000)]
[Orc] Fix missing return in RPC move assignment operator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266804
91177308-0d34-0410-b5e6-
96231b3b80d8
Jacques Pienaar [Tue, 19 Apr 2016 19:15:25 +0000 (19:15 +0000)]
[lanai] Add lowering for SETCCE i32.
* Add lowering for SETCCE i32.
* Add test to check lowering of i64 compares uses SETCCE expansion (outside of EQ and NE).
* Fix select.ll test and immediate form selection for RI operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266802
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 19 Apr 2016 19:10:21 +0000 (19:10 +0000)]
[ValueTracking, VectorUtils] Refactor getIntrinsicIDForCall
The functionality contained within getIntrinsicIDForCall is two-fold: it
checks if a CallInst's callee is a vectorizable intrinsic. If it isn't
an intrinsic, it attempts to map the call's target to a suitable
intrinsic.
Move the mapping functionality into getIntrinsicForCallSite and rename
getIntrinsicIDForCall to getVectorIntrinsicIDForCall while
reimplementing it in terms of getIntrinsicForCallSite.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266801
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Tue, 19 Apr 2016 18:48:16 +0000 (18:48 +0000)]
[X86] Simplify StackMapShadowTracker; NFC
- Elide trivial contructor and desctructor
- Move implementation out of an unnecessary explicit llvm namespace
scope
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266794
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Tue, 19 Apr 2016 18:48:13 +0000 (18:48 +0000)]
[X86MCInstLower] Clean up EmitNops; NFC
Instead of having a conditional assert inside EmitNops, refactor so that
the caller can have the assert instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266793
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Tue, 19 Apr 2016 18:30:18 +0000 (18:30 +0000)]
[Hexagon] Implement branch relaxation
Patch by Sirish Pande.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266792
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 19 Apr 2016 18:00:19 +0000 (18:00 +0000)]
IR: Enable debug info type ODR uniquing for forward decls
Add a new method, DICompositeType::buildODRType, that will create or
mutate the DICompositeType for a given ODR identifier, and use it in
LLParser and BitcodeReader instead of DICompositeType::getODRType.
The logic is as follows:
- If there's no node, create one with the given arguments.
- Else, if the current node is a forward declaration and the new
arguments would create a definition, mutate the node to match the
new arguments.
- Else, return the old node.
This adds a missing feature supported by the current DITypeIdentifierMap
(which I'm slowly making redudant). The only remaining difference is
that the DITypeIdentifierMap has a "the-last-one-wins" rule, whereas
DICompositeType::buildODRType has a "the-first-one-wins" rule.
For now I'm leaving behind DICompositeType::getODRType since it has
obvious, low-level semantics that are convenient for unit testing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266786
91177308-0d34-0410-b5e6-
96231b3b80d8
David L Kreitzer [Tue, 19 Apr 2016 17:43:44 +0000 (17:43 +0000)]
Preliminary changes for fixing PR27241. Generalized/restructured some things
in preparation for enabling the outgoing parameter store-to-push optimization
for 64-bit targets.
Differential Revision: http://reviews.llvm.org/D19222
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266774
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 19 Apr 2016 17:43:43 +0000 (17:43 +0000)]
Linker: Simplify test/Linker/dicompositetype-unique.ll, NFC
Simplify the test logic a little, sharing logic between the two linking
directions by specifying -check-prefix multiple times. Now it's more
obvious what's hte same and different between the two directions, and
there is less CHECK duplication. This is a prep for expanding the test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266773
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Tue, 19 Apr 2016 17:36:58 +0000 (17:36 +0000)]
[llvm-pdbdump] Print a better error message when PDB loading fails.
Differential Revision: http://reviews.llvm.org/D19234
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266772
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 19 Apr 2016 17:26:59 +0000 (17:26 +0000)]
[Orc] Add move ops to RPC to satisfy MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266768
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 19 Apr 2016 17:19:14 +0000 (17:19 +0000)]
[ValueTracking] Improve isImpliedCondition for conditions with matching operands.
This patch improves SimplifyCFG to catch cases like:
if (a < b) {
if (a > b) <- known to be false
unreachable;
}
Phabricator Revision: http://reviews.llvm.org/D18905
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266767
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 19 Apr 2016 17:13:52 +0000 (17:13 +0000)]
[Orc] Add pthread dependence to the RPCUtilsTest unit test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266766
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 19 Apr 2016 17:11:06 +0000 (17:11 +0000)]
IR: LLVMContextTest => DebugTypeODRUniquingTest, NFC
The second test in this file is actually testing DICompositeType API,
not LLVMContext API (after r266742 moved it to a higher level). This
really doesn't make sense in an LLVMContextTest. Rename the tests
before adding more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266764
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 19 Apr 2016 16:57:24 +0000 (16:57 +0000)]
Linker: Avoid constructing ValueMap::MDMapT
Calling ValueMap::MD lazily constructs a ValueMap, which mallocs the
buckets. Instead of swapping constructed maps, move around the
underlying Optional<MDMapT>. This gets rid of some unnecessary malloc
traffic from r266579 (not that it showed up on a profile).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266761
91177308-0d34-0410-b5e6-
96231b3b80d8
Brendon Cahoon [Tue, 19 Apr 2016 16:46:57 +0000 (16:46 +0000)]
[DependenceAnalysis] Refactor uses of getConstantPart. NFC.
Rather than checking for the SCEV type prior to calling
getContantPart, perform the checks in the function. This reduces
the number of places where the checks are needed.
Differential Revision: http://reviews.llvm.org/D19241
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266759
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Tue, 19 Apr 2016 16:21:37 +0000 (16:21 +0000)]
Fix Gold test after r266750 (ModuleLinker: Do not import linkonce/weak as "external_weak")
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266752
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 19 Apr 2016 16:17:48 +0000 (16:17 +0000)]
IR: Use Optional instead of unique_ptr for Metadata map in ValueMap, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266751
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Tue, 19 Apr 2016 16:11:05 +0000 (16:11 +0000)]
ModuleLinker: Do not import linkonce/weak as "external_weak"
Summary:
There is no reason to have a weak reference because the external
definition will be weak.
Reviewers: rafael
Subscribers: llvm-commits, tejohnson
Differential Revision: http://reviews.llvm.org/D19267
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266750
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 19 Apr 2016 16:06:50 +0000 (16:06 +0000)]
IR: Use Optional instead of unique_ptr for debug info ODR type map, NFC
Save a level of malloc indirection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266749
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Tue, 19 Apr 2016 15:48:30 +0000 (15:48 +0000)]
Enable ODR uniquing of DITypes in more places
Summary:
This is a follow-on to apply Duncan's new DIType ODR uniquing from
r266549 and r266713 in more places.
Enable enableDebugTypeODRUniquing() for ThinLTO backends invoked via
libLTO, similar to the way r266549 enabled this for ThinLTO backend
threads launched from gold-plugin.
Also enable enableDebugTypeODRUniquing in opt, similar to the way
r266549 enabled this for llvm-link (on by default, can be disabled with
new -disable-debug-info-type-map option), since we may perform ThinLTO
importing from opt.
Reviewers: dexonsmith, joker.eph
Subscribers: joker.eph, llvm-commits
Differential Revision: http://reviews.llvm.org/D19263
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266746
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 19 Apr 2016 14:55:09 +0000 (14:55 +0000)]
IR: getOrInsertODRUniquedType => DICompositeType::getODRType, NFC
Lift the API for debug info ODR type uniquing up a layer. Instead of
clients managing the map directly on the LLVMContext, add a static
method to DICompositeType called getODRType and handle the map in the
background. Also adds DICompositeType::getODRTypeIfExists, so far just
for convenience in the unit tests.
This simplifies the logic in LLParser and BitcodeReader. Because of
argument spam there are actually a few more lines of code now; I'll see
if I come up with a reasonable way to clean that up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266742
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 19 Apr 2016 14:42:55 +0000 (14:42 +0000)]
IR: Require DICompositeType for ODR uniquing type map
Tighten up the API for debug info ODR type uniquing in LLVMContext. The
only reason to allow other DIType subclasses is to make the unit tests
prettier :/.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266737
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 19 Apr 2016 12:59:52 +0000 (12:59 +0000)]
[InstCombine][X86] Added extra tests introduced for D17490
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266732
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 19 Apr 2016 12:56:46 +0000 (12:56 +0000)]
[InstCombine][X86] Regenerate SSE combine tests as part of setup for D17490
Regenerated with utils/update_test_checks.py
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266731
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 19 Apr 2016 12:26:40 +0000 (12:26 +0000)]
[X86][AVX2] Prefer VPERMQ/VPERMPD over VINSERTI128/VINSERTF128 for unary shuffles
Using VPERMQ/VPERMPD allows memory folding of the (repeated) input where VINSERTI128/VINSERTF128 can not.
Differential Revision: http://reviews.llvm.org/D19228
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266728
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Tue, 19 Apr 2016 09:21:30 +0000 (09:21 +0000)]
Minor improvement to debug output for Function Importer (NFC)
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266723
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Tue, 19 Apr 2016 06:25:02 +0000 (06:25 +0000)]
Add a description for the PatchableFunction pass; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266721
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Tue, 19 Apr 2016 06:24:58 +0000 (06:24 +0000)]
Disable the PatchableFunction pass for NVPTX & Wasm
PatchableFunction requires AllVRegsAllocated that these targets don't
provide.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266720
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Berlin [Tue, 19 Apr 2016 06:13:28 +0000 (06:13 +0000)]
Correct IDF calculator for ReverseIDF
Summary:
Need to use predecessors for reverse graph, successors for forward graph.
succ_iterator/pred_iterator are not compatible, this patch is all the work necessary to work around that (which is what everywhere else does). Not sure if there is a better way, so cc'ing some random folks to take a gander :)
Reviewers: dblaikie, qcolombet, echristo
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D18796
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266718
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 19 Apr 2016 06:01:51 +0000 (06:01 +0000)]
[Orc] Disable RPC callST unit test until the S390 failures encountered during
http://lab.llvm.org:8011/builders/clang-s390x-linux/builds/3459 can be
debugged/fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266717
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Tue, 19 Apr 2016 05:24:47 +0000 (05:24 +0000)]
Introduce a "patchable-function" function attribute
Summary:
The `"patchable-function"` attribute can be used by an LLVM client to
influence LLVM's code generation in ways that makes the generated code
easily patchable at runtime (for instance, to redirect control).
Right now only one patchability scheme is supported,
`"prologue-short-redirect"`, but this can be expanded in the future.
Reviewers: joker.eph, rnk, echristo, dberris
Subscribers: joker.eph, echristo, mcrosier, llvm-commits
Differential Revision: http://reviews.llvm.org/D19046
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266715
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 19 Apr 2016 04:55:25 +0000 (04:55 +0000)]
IR: Rename API for enabling ODR uniquing of DITypes, NFC
As per David's review, rename everything in the new API for ODR type
uniquing of debug info.
ensureDITypeMap => enableDebugTypeODRUniquing
destroyDITypeMap => disableDebugTypeODRUniquing
hasDITypeMap => isODRUniquingDebugTypes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266713
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 19 Apr 2016 04:44:21 +0000 (04:44 +0000)]
[ORC] Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266712
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 19 Apr 2016 04:43:09 +0000 (04:43 +0000)]
[Orc] Tidy up some of the RPC primitives, add a unit-test for the callST
(synchronous call) primitive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266711
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 19 Apr 2016 03:46:51 +0000 (03:46 +0000)]
BitcodeWriter: Break recursion when enumerating Metadata, almost NFC
Use a worklist instead of recursing through MDNode operands in
ValueEnumerator. The actual record output order has changed slightly,
but otherwise there's no functionality change.
I had to update test/Bitcode/metadata-function-blocks.ll. I renumbered
nodes so they continue to match the implicit record ids.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266709
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Tue, 19 Apr 2016 02:04:01 +0000 (02:04 +0000)]
vim: add swiftcc keyword
Update the syntax highlighting for SVN r265480.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266705
91177308-0d34-0410-b5e6-
96231b3b80d8
Jacques Pienaar [Tue, 19 Apr 2016 00:26:42 +0000 (00:26 +0000)]
[lanai] Set boolean contentss to ZeroOrOneBooleanContent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266701
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Tue, 19 Apr 2016 00:17:55 +0000 (00:17 +0000)]
Increase SmallVector size for ConstantUniqueMap::getHashValue() (NFC)
This remove totally any malloc from this function on my
profile (from 155k before).
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266700
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Mon, 18 Apr 2016 23:55:01 +0000 (23:55 +0000)]
Port DemandedBits to the new pass manager.
Differential Revision: http://reviews.llvm.org/D18679
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266699
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Mon, 18 Apr 2016 23:27:25 +0000 (23:27 +0000)]
Add missing #include, found by modules selfhost.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266697
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Mon, 18 Apr 2016 23:24:39 +0000 (23:24 +0000)]
Add missing header, found by modules selfhost.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266696
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Mon, 18 Apr 2016 22:50:39 +0000 (22:50 +0000)]
[libFuzzer] try to print correct time in seconds when reporting a timeout. Don't report timeouts while still loading the corpus.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266693
91177308-0d34-0410-b5e6-
96231b3b80d8
Paul Robinson [Mon, 18 Apr 2016 22:41:41 +0000 (22:41 +0000)]
[DWARF] Force a linkage_name on an inlined subprogram's abstract origin.
When we suppress linkage names, for a non-inlined subprogram the name
can still be found in the object-file symbol table, because we have
the code address of the subprogram. This is not necessarily the case
for an inlined subprogram, so we still want to emit the linkage name
in the DWARF. Put this on the abstract-origin DIE because it's common
to all inlined instances.
Differential Revision: http://reviews.llvm.org/D18706
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266692
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 18 Apr 2016 22:38:52 +0000 (22:38 +0000)]
Remove old DIBuilder::createFunction overload used only by dragonegg, which does not currently build
NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266691
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Mon, 18 Apr 2016 21:54:00 +0000 (21:54 +0000)]
Add debugging to the cache pruning
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266686
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Mon, 18 Apr 2016 21:53:55 +0000 (21:53 +0000)]
CachePruning: fix typo, we accumulate file size here, not time
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266685
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 18 Apr 2016 21:48:55 +0000 (21:48 +0000)]
ARM: use a pseudo-instruction for cmpxchg at -O0.
The fast register-allocator cannot cope with inter-block dependencies without
spilling. This is fine for ldrex/strex loops coming from atomicrmw instructions
where any value produced within a block is dead by the end, but not for
cmpxchg. So we lower a cmpxchg at -O0 via a pseudo-inst that gets expanded
after regalloc.
Fortunately this is at -O0 so we don't have to care about performance. This
simplifies the various axes of expansion considerably: we assume a strong
seq_cst operation and ensure ordering via the always-present DMB instructions
rather than v8 acquire/release instructions.
Should fix the 32-bit part of PR25526.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266679
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Mon, 18 Apr 2016 21:14:11 +0000 (21:14 +0000)]
[libFuzzer] warn if the corpus is empty
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266670
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 18 Apr 2016 21:07:49 +0000 (21:07 +0000)]
[X86][SSE] Test case for PR2585
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266669
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Mon, 18 Apr 2016 20:56:22 +0000 (20:56 +0000)]
[Orc] Explicitly delete RPC::SequenceNumberManager's copy-constructor and
copy-assignment operator.
MSVC is trying to synthesize these and failing. Hopefully explicitly deleting
them will help.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266665
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Mon, 18 Apr 2016 19:55:43 +0000 (19:55 +0000)]
[Orc] Re-commit r266581 with fixes for MSVC, and format cleanups.
Fixes:
(1) Removes constexpr (unsupported in MSVC)
(2) Move constructors (remove explicitly defaulted ones)
(3) <future> - Add warning suppression for MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266663
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 18 Apr 2016 19:48:16 +0000 (19:48 +0000)]
[X86][AVX] Added extra memory folding tests for D19228
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266662
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 18 Apr 2016 19:11:57 +0000 (19:11 +0000)]
try to make comments more meaningful; NFC
Retry r266541 without the range-based-for-loop-change that was wrong.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266658
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Mon, 18 Apr 2016 19:11:45 +0000 (19:11 +0000)]
[ValueTracking] Correct lit test comments. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266657
91177308-0d34-0410-b5e6-
96231b3b80d8
Marcin Koscielnicki [Mon, 18 Apr 2016 19:04:19 +0000 (19:04 +0000)]
Fix shared build of LLVMPasses.
It's missing a dependency on Instrumentation (needed for
llvm::InstrProfiling::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&))
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266656
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Mon, 18 Apr 2016 19:01:28 +0000 (19:01 +0000)]
[BPI] Consider deoptimize calls as "unreachable"
Summary:
Calls to @llvm.experimental.deoptimize are expected to "never execute",
so optimize them as such.
Reviewers: chandlerc
Subscribers: junbuml, mcrosier, llvm-commits
Differential Revision: http://reviews.llvm.org/D19095
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266654
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Mon, 18 Apr 2016 18:52:39 +0000 (18:52 +0000)]
lli: avoid global variables, use a local unique_ptr instead
There was issue with order of destruction in some cases.
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266652
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Mon, 18 Apr 2016 18:41:25 +0000 (18:41 +0000)]
[libFuzzer] add fresh openssl trophies
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266649
91177308-0d34-0410-b5e6-
96231b3b80d8