OSDN Git Service
Duncan P. N. Exon Smith [Tue, 10 Feb 2015 01:09:50 +0000 (01:09 +0000)]
Verifier: Create stubs for specialized metadata nodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228645
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 10 Feb 2015 01:08:16 +0000 (01:08 +0000)]
AsmParser: Add stubs for specialized MDNodes, NFC
Well, the exact error from the failed parse will change, but...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228644
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 10 Feb 2015 00:57:42 +0000 (00:57 +0000)]
X86: Emit an ABI compliant prologue and epilogue for Win64
Win64 has specific contraints on what valid prologues and epilogues look
like. This constraint is born from the flexibility and descriptiveness
of Win64's unwind opcodes.
Prologues previously emitted by LLVM could not be represented by the
unwind opcodes, preventing operations powered by stack unwinding to
successfully work.
Differential Revision: http://reviews.llvm.org/D7520
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228641
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 10 Feb 2015 00:52:32 +0000 (00:52 +0000)]
IR: Add specialized debug info metadata nodes
Add specialized debug info metadata nodes that match the `DIDescriptor`
wrappers (used by `DIBuilder`) closely. Assembly and bitcode support to
follow soon (it'll mostly just be obvious), but this sketches in today's
schema. This is the first big commit (well, the only *big* one aside
from the testcase changes that'll come when I move this into place) for
PR22464.
I've marked a bunch of obvious changes as `TODO`s in the source; I plan
to make those changes promptly after this hierarchy is moved underneath
`DIDescriptor`, but for now I'm aiming mostly to match the status quo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228640
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 10 Feb 2015 00:44:17 +0000 (00:44 +0000)]
Migrate PPCAsmPrinter's subtarget from reference to pointer in
preparation for making it MachineFunction dependent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228638
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 10 Feb 2015 00:37:26 +0000 (00:37 +0000)]
[Orc] Back out one of the GCC ICE workarounds from r228568. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228637
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 10 Feb 2015 00:16:36 +0000 (00:16 +0000)]
Fix the clang -Werror build (-Wunused-variable)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228635
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Tue, 10 Feb 2015 00:04:53 +0000 (00:04 +0000)]
Adjust how we avoid poll insertion inside the poll function (NFC)
I realized that my early fix for this was overly complicated. Rather than scatter checks around in a bunch of places, just exit early when we visit the poll function itself.
Thinking about it a bit, the whole inlining mechanism used with gc.safepoint_poll could probably be cleaned up a bit. Originally, poll insertion was fused with gc relocation rewriting. It might be worth going back to see if we can simplify the chain of events now that these two are seperated. As one thought, maybe it makes sense to rewrite calls inside the helper function before inlining it to the many callers. This would require us to visit the poll function before any other functions though..
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228634
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Tue, 10 Feb 2015 00:00:54 +0000 (00:00 +0000)]
Reverting r228628; it broke at least one builder due to the forward declare of RaiseException.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228633
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Mon, 9 Feb 2015 23:57:22 +0000 (23:57 +0000)]
Debug info: When updating debug info during SROA, do not emit debug info
for any padding introduced by SROA. In particular, do not emit debug info
for an alloca that represents only the padding introduced by a previous
iteration.
Fixes PR22495.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228632
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Mon, 9 Feb 2015 23:57:15 +0000 (23:57 +0000)]
Debug info: Use DW_OP_bit_piece instead of DW_OP_piece in the
intermediate representation. This
- increases consistency by using the same granularity everywhere
- allows for pieces < 1 byte
- DW_OP_piece didn't actually allow storing an offset.
Part of PR22495.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228631
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Mon, 9 Feb 2015 23:45:24 +0000 (23:45 +0000)]
[Hexagon] Adding missing load instructions and removing an unused multiclass parameter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228630
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Mon, 9 Feb 2015 23:21:05 +0000 (23:21 +0000)]
ADT: Allow up to 18 arguments in hash_combine()
I just realized that the specialized metadata node patch I'm about to
commit won't compile on old compilers. Bump `hash_combine()`'s support
for non-variadic templates to 18 (I tested this by reversing the logic
in the #ifdef).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228629
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Mon, 9 Feb 2015 23:11:39 +0000 (23:11 +0000)]
On Windows, we now use RaiseException to generate the kind of trap we require (one which calls our vectored exception handler), and fall back to using a volatile write to simulate a trap elsewhere.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228628
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Mon, 9 Feb 2015 23:05:44 +0000 (23:05 +0000)]
[Hexagon] Factoring classes out of some load patterns and deleting some unused ones.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228627
91177308-0d34-0410-b5e6-
96231b3b80d8
Ramkumar Ramachandra [Mon, 9 Feb 2015 23:02:10 +0000 (23:02 +0000)]
[Statepoint] Improve two asserts, fix some style (NFC)
Summary:
It's important that our users immediately know what gc.safepoint_poll
is. Also fix the style of the declaration of CreateGCStatepoint, in
preparation for another change that will wrap it.
Reviewers: reames
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D7517
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228626
91177308-0d34-0410-b5e6-
96231b3b80d8
Ramkumar Ramachandra [Mon, 9 Feb 2015 23:00:40 +0000 (23:00 +0000)]
PlaceSafepoints: modernize gc.result.* -> gc.result
Differential Revision: http://reviews.llvm.org/D7516
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228625
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Mon, 9 Feb 2015 22:48:04 +0000 (22:48 +0000)]
DebugInfo: Remove DW_TAG_constant
Remove handling for DW_TAG_constant. We started producing it in
r110656, but reverted that in r110876 without dropping the support.
Finish the job.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228623
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Mon, 9 Feb 2015 22:44:03 +0000 (22:44 +0000)]
Update file comment to clarify points highlighted in review (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228621
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Mon, 9 Feb 2015 22:26:11 +0000 (22:26 +0000)]
Use range for loops in PlaceSafepoints (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228620
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Mon, 9 Feb 2015 22:13:27 +0000 (22:13 +0000)]
IR: Take uint64_t in DIBuilder::createExpression()
`DIExpression` deals with `uint64_t`, so it doesn't make sense that
`createExpression()` is created from `int64_t`. Switch to `uint64_t` to
unify them.
I've temporarily left in the `int64_t` version, which forwards to the
`uint64_t` version. I'll delete it once I've updated the callers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228619
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Mon, 9 Feb 2015 22:10:15 +0000 (22:10 +0000)]
Introduce more tests for PlaceSafepoints
These tests the two optimizations for backedge insertion currently implemented and the split backedge flag which is currently off by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228617
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Mon, 9 Feb 2015 22:07:49 +0000 (22:07 +0000)]
Revert "Raising minimum required CMake version to 2.8.12.2."
This reverts commit
add62ac537d8249fa2161405066e318ca80e199d.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228616
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Mon, 9 Feb 2015 22:05:07 +0000 (22:05 +0000)]
Raising minimum required CMake version to 2.8.12.2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228615
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Mon, 9 Feb 2015 21:56:37 +0000 (21:56 +0000)]
[Hexagon] Removing more V4 predicates since V4 is the required minimum.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228614
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Mon, 9 Feb 2015 21:50:31 +0000 (21:50 +0000)]
Minor test cleanup
a) add gc attribute
b) remove unused param
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228612
91177308-0d34-0410-b5e6-
96231b3b80d8
Ramkumar Ramachandra [Mon, 9 Feb 2015 21:50:03 +0000 (21:50 +0000)]
MemDerefPrinter: Require DataLayoutPass for higher accuracy
Without a valid data layout, deferenceable(N) doesn't get parsed or
propagated. Since this is the key item we are testing, add a dependency
on the pass.
Differential Revision: http://reviews.llvm.org/D7508
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228611
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Mon, 9 Feb 2015 21:48:05 +0000 (21:48 +0000)]
Add basic tests for PlaceSafepoints
This is just adding really simple tests which should have been part of the original submission. When doing so, I discovered that I'd mistakenly removed required pieces when preparing the patch for upstream submission. I fixed two such bugs in this submission.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228610
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Mon, 9 Feb 2015 21:30:05 +0000 (21:30 +0000)]
Verifier: Const-qualify Metadata, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228609
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Mon, 9 Feb 2015 21:26:34 +0000 (21:26 +0000)]
IR: Document horrible abuse of loose DIDescriptor, NFC
I'll circle back and fix this somehow; for now I just don't want to
forget about it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228608
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Mon, 9 Feb 2015 21:23:34 +0000 (21:23 +0000)]
IR: Remove dead code in DITemplate*
These are never referenced or filled in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228607
91177308-0d34-0410-b5e6-
96231b3b80d8
Ramkumar Ramachandra [Mon, 9 Feb 2015 21:08:03 +0000 (21:08 +0000)]
isDereferenceablePointer: look through gc.relocate calls
While a theoretical GC might change dereferenceability on collection,
there is no such known collector and no need to account for the case
with a flag yet.
Differential Revision: http://reviews.llvm.org/D7454
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228606
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Mon, 9 Feb 2015 21:07:35 +0000 (21:07 +0000)]
[Hexagon] Removing v2-4 flags. V4 is the minimum supported version.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228605
91177308-0d34-0410-b5e6-
96231b3b80d8
Ben Langmuir [Mon, 9 Feb 2015 20:34:24 +0000 (20:34 +0000)]
Reduce the LockFileManager timeout, and provide unsafeRemoveLockFile
5 minutes is an eternity, so try to strike a better balance between
waiting long enough for any reasonable module build and not so long that
users kill the process because they think it's hanging.
Also give the client a way to delete the lock file after a timeout.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228603
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Mon, 9 Feb 2015 20:33:46 +0000 (20:33 +0000)]
[Hexagon] Factoring classes out of store patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228602
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Mon, 9 Feb 2015 20:03:42 +0000 (20:03 +0000)]
[Hexagon] Formatting v5 TD file. Removing commented defs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228598
91177308-0d34-0410-b5e6-
96231b3b80d8
Ramkumar Ramachandra [Mon, 9 Feb 2015 19:49:54 +0000 (19:49 +0000)]
MemDepPrinter: cleanup a few loops (NFC)
Make use of the newly introduced inst_range to clean up two loops. Clean
up a third one while at it.
Differential Revision: http://reviews.llvm.org/D7455
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228596
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Mon, 9 Feb 2015 19:39:00 +0000 (19:39 +0000)]
Address post-commit review for rL228587: make it explicit that the
<NW> bit of a SCEVAddRecExpr does not depend on the sign of the step
and the start value of the step.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228595
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Mon, 9 Feb 2015 19:24:44 +0000 (19:24 +0000)]
[Hexagon] Cleaning up definition formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228593
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Mon, 9 Feb 2015 18:44:42 +0000 (18:44 +0000)]
Clarify the wording on what it means for a SCEVAddRecExpr to be <NW>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228587
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Mon, 9 Feb 2015 18:34:55 +0000 (18:34 +0000)]
Bugfix: SCEV incorrectly marks certain add recurrences as nsw
When creating a scev for sext({X,+,Y}), scev checks if the expression
is equivalent to {sext X,+,zext Y}. If it can prove that, it also
tags the original {X,+,Y} as <nsw>, which is not correct.
In the test case I run `-scalar-evolution` twice because the bug
manifests only once SCEV has run through and seen the `sext`
expressions (and then does a in-place mutation on {X,+,Y}).
Differential Revision: http://reviews.llvm.org/D7495
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228586
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Mon, 9 Feb 2015 18:16:43 +0000 (18:16 +0000)]
[Orc] Revert r228567 (GCC ICE workaround) - it doesn't seem to have helped.
As far as I can tell r228568 was the right workaround, and r228567 was
unnecessary. If reverting this causes problems on the bots I'll reinstate it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228585
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 9 Feb 2015 17:17:09 +0000 (17:17 +0000)]
fixed to test features, not CPUs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228581
91177308-0d34-0410-b5e6-
96231b3b80d8
Kit Barton [Mon, 9 Feb 2015 17:03:18 +0000 (17:03 +0000)]
This change implements the following three logical vector operations:
veqv (vector equivalence)
vnand
vorc
I increased the AddedComplexity for these instructions to 500 to ensure they are generated instead of issuing other VSX instructions.
Phabricator review: http://reviews.llvm.org/D7469
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228580
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 9 Feb 2015 16:30:58 +0000 (16:30 +0000)]
rename variable to give it some meaning; remove obvious comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228579
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 9 Feb 2015 16:04:52 +0000 (16:04 +0000)]
fix comment that didn't match the code; remove unnecessary braces; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228578
91177308-0d34-0410-b5e6-
96231b3b80d8
Johannes Doerfert [Mon, 9 Feb 2015 12:34:23 +0000 (12:34 +0000)]
Allow ScalarEvolution to catch more min/max cases
For the attached test case different types are used in the ICmpInst
and SelectInst that represent the min/max expressions. However, if the
ICmpInst type is smaller a comparison with the sign/zero extended
operands would have yielded the same result. This situation might
arise after the instruction combination pass was applied.
Differential Revision: http://reviews.llvm.org/D7338
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228572
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Mon, 9 Feb 2015 07:47:32 +0000 (07:47 +0000)]
[Orc] Try another workaround for the GCC 4.7.2 ICE introduced in r228557. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228568
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Mon, 9 Feb 2015 07:22:56 +0000 (07:22 +0000)]
[Orc] Tweak lambda capture lists to try to avoid an ICE on gcc-4.7.2. NFC.
Apparently gcc-4.7.2 is touchy about 'this' appearing in a lambda capture list
along with other captures. I've rewritten my captures to try to avoid the issue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228567
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Mon, 9 Feb 2015 06:38:23 +0000 (06:38 +0000)]
Fix a bug in DemoteRegToStack where a reload instruction was inserted into the
wrong basic block.
This would happen when the result of an invoke was used by a phi instruction
in the invoke's normal destination block. An instruction to reload the invoke's
value would get inserted before the critical edge was split and a new basic
block (which is the correct insertion point for the reload) was created. This
commit fixes the bug by splitting the critical edge before all the reload
instructions are inserted.
Also, hoist up the code which computes the insertion point to the only place
that need that computation.
rdar://problem/
15978721
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228566
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Mon, 9 Feb 2015 06:31:31 +0000 (06:31 +0000)]
MC: Calculate intra-section symbol differences correctly for COFF
This fixes PR22060.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228565
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Mon, 9 Feb 2015 04:46:41 +0000 (04:46 +0000)]
[Orc] Fix the MSVC bots by using LLVM_EXPLICIT rather than explicit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228564
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 9 Feb 2015 04:04:53 +0000 (04:04 +0000)]
[X86] Remove 256-bit and 512-bit memop pattern fragments. They are no longer used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228563
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 9 Feb 2015 04:04:50 +0000 (04:04 +0000)]
[X86] Remove 'memop' uses from AVX512. Use 'load' instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228562
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 9 Feb 2015 01:21:00 +0000 (01:21 +0000)]
DeadArgElim: fix mismatch in accounting of array return types.
Some parts of DeadArgElim were only considering the individual fields
of StructTypes separately, but others (where insertvalue &
extractvalue instructions occur) also looked into ArrayTypes.
This one is an actual bug; the mismatch can lead to an argument being
considered used by a return sub-value that isn't being tracked (and
hence is dead by default). It then gets incorrectly eliminated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228559
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 9 Feb 2015 01:20:53 +0000 (01:20 +0000)]
DeadArgElim: assess uses of entire return value aggregate.
Previously, a non-extractvalue use of an aggregate return value meant
the entire return was considered live (the algorithm gave up
entirely). This was correct, but conservative. It's better to actually
look at that Use, making the analysis results apply to all sub-values
under consideration.
E.g.
%val = call { i32, i32 } @whatever()
[...]
ret { i32, i32 } %val
The return is using the entire aggregate (sub-values 0 and 1). We can
still simplify @whatever if we can prove that this return is itself
unused.
Also unifies the logic slightly between aggregate and non-aggregate
cases..
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228558
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Mon, 9 Feb 2015 01:20:51 +0000 (01:20 +0000)]
[Orc] Add a JITSymbol class to the Orc APIs, refactor APIs, update clients.
This patch refactors a key piece of the Orc APIs: It removes the
*::getSymbolAddress and *::lookupSymbolAddressIn methods, which returned target
addresses (uint64_ts), and replaces them with *::findSymbol and *::findSymbolIn
respectively, which return instances of the new JITSymbol type. Unlike the old
methods, calling findSymbol or findSymbolIn does not cause the symbol to be
immediately materialized when found. Instead, the symbol will be materialized
if/when the getAddress method is called on the returned JITSymbol. This allows
us to query for the existence of symbols without actually materializing them. In
the future I expect more information to be attached to the JITSymbol class, for
example whether the returned symbol is a weak or strong definition. This will
allow us to properly handle weak symbols and multiple definitions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228557
91177308-0d34-0410-b5e6-
96231b3b80d8
Ramkumar Ramachandra [Mon, 9 Feb 2015 01:13:13 +0000 (01:13 +0000)]
InstCombine: propagate nonNull through assume
Make assume (load (call|invoke) != null) set nonNull return attribute
for the call and invoke. Also include tests.
Differential Revision: http://reviews.llvm.org/D7107
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228556
91177308-0d34-0410-b5e6-
96231b3b80d8
Ramkumar Ramachandra [Mon, 9 Feb 2015 00:30:03 +0000 (00:30 +0000)]
[emacs] Get llvm-mode to font-lock "personality"
Differential Revision: http://reviews.llvm.org/D7494
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228555
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Sun, 8 Feb 2015 23:15:37 +0000 (23:15 +0000)]
Fix -Wuninitialized build by referencing the relevant ctor parameter instead of the base class member variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228554
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Sun, 8 Feb 2015 22:53:53 +0000 (22:53 +0000)]
Make PDBSymbol's IPDBSymbol reference const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228553
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Sun, 8 Feb 2015 22:52:17 +0000 (22:52 +0000)]
Bugfix: ScalarEvolution incorrectly assumes that the start of certain
add recurrences don't overflow.
This change makes the optimization more restrictive. It still assumes
that an overflowing `add nsw` is undefined behavior; and this change
will need revisiting once we have a consistent semantics for poison
values.
Differential Revision: http://reviews.llvm.org/D7331
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228552
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 8 Feb 2015 22:38:25 +0000 (22:38 +0000)]
[X86] Remove the remaining uses of memop from AVX and AVX2 instruction patterns. AVX and AVX2 can handle unaligned loads being folded so we can just use 'load'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228551
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 8 Feb 2015 21:56:09 +0000 (21:56 +0000)]
Metadata: Use <algorithm> to simplify code. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228550
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 8 Feb 2015 21:14:27 +0000 (21:14 +0000)]
fix test attributes; this is an SSE2 test, not a Nehalem test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228546
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 8 Feb 2015 21:10:40 +0000 (21:10 +0000)]
fix test attributes; this is an x86-64 test, not a Nehalem test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228545
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 8 Feb 2015 21:05:03 +0000 (21:05 +0000)]
fix test attributes; these are SSE2 tests, not Nehalem tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228544
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Sun, 8 Feb 2015 21:03:30 +0000 (21:03 +0000)]
Kaleidoscope-Orc: Reuse the IRGen utility function in later chapters, and remove an unused parameter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228543
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Sun, 8 Feb 2015 20:58:09 +0000 (20:58 +0000)]
DebugInfoPDB: Make the symbol base case hold an IPDBSession ref.
Dumping a symbol often requires access to data that isn't inside
the symbol hierarchy, but which is only accessible through the
top-level session. This patch is a pure interface change to give
symbols a reference to the session.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228542
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 8 Feb 2015 20:50:58 +0000 (20:50 +0000)]
fix test attributes; these are SSE2 tests, not Nehalem tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228541
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Sun, 8 Feb 2015 20:29:28 +0000 (20:29 +0000)]
Kaleidoscope-Orc: Extract IRGen work into a utility function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228539
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Sun, 8 Feb 2015 20:15:01 +0000 (20:15 +0000)]
Constify the Orc Kaleidoscope examples IRGen functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228537
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 8 Feb 2015 20:05:53 +0000 (20:05 +0000)]
fix test attributes; these are x86-64 tests, not Nehalem tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228536
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 8 Feb 2015 20:01:12 +0000 (20:01 +0000)]
fix test attributes; these are MMX tests, not Nehalem tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228535
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 8 Feb 2015 19:50:55 +0000 (19:50 +0000)]
fix test attributes; these are SSE2 tests, not Nehalem tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228534
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 8 Feb 2015 19:38:25 +0000 (19:38 +0000)]
generalize test; nothing Nehalem-specific here
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228532
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Sun, 8 Feb 2015 19:15:33 +0000 (19:15 +0000)]
[Orc][Kaleidoscope] Build Kaleidoscope/Orc tutorials with warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228531
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Sun, 8 Feb 2015 19:14:56 +0000 (19:14 +0000)]
[Orc][Kaleidoscope] Remove fixed sized buffers from string conversion code and
further c++ify the Kaleidoscope/Orc tutorials.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228530
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 8 Feb 2015 18:54:22 +0000 (18:54 +0000)]
fix typos; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228529
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 8 Feb 2015 18:33:13 +0000 (18:33 +0000)]
[X86][AVX2] AVX2 broadcast + permute memory folding tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228528
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Sun, 8 Feb 2015 18:08:51 +0000 (18:08 +0000)]
Make UTF8->UTF16 conversion null terminate output on empty input.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228527
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 8 Feb 2015 17:13:54 +0000 (17:13 +0000)]
Moved AVX2 vbroadcast (reg) instruction foldings under the correct grouping. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228526
91177308-0d34-0410-b5e6-
96231b3b80d8
Bjorn Steinbrink [Sun, 8 Feb 2015 17:07:14 +0000 (17:07 +0000)]
Correctly combine alias.scope metadata by a union instead of intersecting
Summary:
The alias.scope metadata represents sets of things an instruction might
alias with. When generically combining the metadata from two
instructions the result must be the union of the original sets, because
the new instruction might alias with anything any of the original
instructions aliased with.
Reviewers: hfinkel
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D7490
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228525
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sun, 8 Feb 2015 11:15:08 +0000 (11:15 +0000)]
[CMake] Kaleidoscope-Orc: Update libdeps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228524
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Sun, 8 Feb 2015 08:27:19 +0000 (08:27 +0000)]
Masked Gather and Scatter Intrinsics.
Gather and Scatter are new introduced intrinsics, comming after recently implemented masked load and store.
This is the first patch for Gather and Scatter intrinsics. It includes only the syntax, parsing and verification.
Gather and Scatter intrinsics allow to perform multiple memory accesses (read/write) in one vector instruction.
The intrinsics are not target specific and will have the following syntax:
Gather:
declare <16 x i32> @llvm.masked.gather.v16i32(<16 x i32*> <vector of ptrs>, i32 <alignment>, <16 x i1> <mask>, <16 x i32> <passthru>)
declare <8 x float> @llvm.masked.gather.v8f32(<8 x float*><vector of ptrs>, i32 <alignment>, <8 x i1> <mask>, <8 x float><passthru>)
Scatter:
declare void @llvm.masked.scatter.v8i32(<8 x i32><vector value to be stored> , <8 x i32*><vector of ptrs> , i32 <alignment>, <8 x i1> <mask>)
declare void @llvm.masked.scatter.v16i32(<16 x i32> <vector value to be stored> , <16 x i32*> <vector of ptrs>, i32 <alignment>, <16 x i1><mask> )
Vector of ptrs - a set of source/destination addresses, to load/store the value.
Mask - switches on/off vector lanes to prevent memory access for switched-off lanes
vector of ptrs, value and mask should have the same vector width.
These are code examples where gather / scatter should be used and will allow function vectorization
;void foo1(int * restrict A, int * restrict B, int * restrict C) {
; for (int i=0; i<SIZE; i++) {
; A[i] = B[C[i]];
; }
;}
;void foo3(int * restrict A, int * restrict B) {
; for (int i=0; i<SIZE; i++) {
; A[B[i]] = i+5;
; }
;}
Tests will come in the following patches, with CodeGen and Vectorizer.
http://reviews.llvm.org/D7433
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228521
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Sun, 8 Feb 2015 07:20:04 +0000 (07:20 +0000)]
Add CMake build support for Orc examples (& fix some clang -Werror build
breaks due to unused variables).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228520
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Sun, 8 Feb 2015 04:34:13 +0000 (04:34 +0000)]
[Orc][Kaleidoscope] Fix method-name think-o. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228519
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Sun, 8 Feb 2015 00:50:47 +0000 (00:50 +0000)]
ARM & AArch64: teach LowerVSETCC that output type size may differ from input.
While various DAG combines try to guarantee that a vector SETCC
operation will have the same output size as input, there's nothing
intrinsic to either creation or LegalizeTypes that actually guarantees
it, so the function needs to be ready to handle a mismatch.
Fortunately this is easy enough, just extend or truncate the naturally
compared result.
I couldn't reproduce the failure in other backends that I know have
SIMD, so it's probably only an issue for these two due to shared
heritage.
Should fix PR21645.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228518
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Sun, 8 Feb 2015 00:41:31 +0000 (00:41 +0000)]
Removed unused function mistakenly left in, triggering -Werror.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228517
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Sun, 8 Feb 2015 00:29:29 +0000 (00:29 +0000)]
Some cleanup for libpdb.
This patch implements a few of the optional suggestions from the
initial patch comitting libpdb. In particular, it implements a
virtual function out of line for each of the concrete classes.
A few other minor cleanups exist as well, such as using override
instead of virtual, etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228516
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 7 Feb 2015 23:36:51 +0000 (23:36 +0000)]
[X86] Add register use/def for wrmsr and rdmsr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228515
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 7 Feb 2015 23:36:36 +0000 (23:36 +0000)]
[X86] Add GETSEC instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228514
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 7 Feb 2015 23:28:16 +0000 (23:28 +0000)]
[X86][AVX2] AVX2 integer stack folding tests.
This adds tests for the remaining AVX2 instructions that currently support memory folding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228513
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Sat, 7 Feb 2015 23:23:43 +0000 (23:23 +0000)]
Rename the 'Extending the Language: Debug Information' to 'Adding Debug Information' since this isn't actually modifying/extending the language.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228512
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 7 Feb 2015 21:44:06 +0000 (21:44 +0000)]
[X86][AVX] Added missing stack folding support + test for vptest ymm instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228509
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 7 Feb 2015 21:37:08 +0000 (21:37 +0000)]
LoopIdiom: Use utility functions.
The only difference between deleteIfDeadInstruction and
RecursivelyDeleteTriviallyDeadInstructions is that the former also
manually invalidates SCEV. That's unnecessary because SCEV automatically
gets informed when an instruction is deleted via a ValueHandle. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228508
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Sat, 7 Feb 2015 21:24:06 +0000 (21:24 +0000)]
Avoid integer overflows around realloc calls resulting in potential
heap. Problem identified by Guido Vranken. Changes differ from original
OpenBSD sources by not depending on non-portable reallocarray.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228507
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 7 Feb 2015 21:20:11 +0000 (21:20 +0000)]
[X86][SSE] Added missing stack folding tests for (v)mpsadbw instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228506
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 7 Feb 2015 19:29:02 +0000 (19:29 +0000)]
ValueTracking: Make isBytewiseValue simpler and more powerful at the same time.
Turns out there is a simpler way of checking that all bytes in a word are equal
than binary decomposition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228503
91177308-0d34-0410-b5e6-
96231b3b80d8
Bjorn Steinbrink [Sat, 7 Feb 2015 17:54:36 +0000 (17:54 +0000)]
Properly update AA metadata when performing call slot optimization
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D7482
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228500
91177308-0d34-0410-b5e6-
96231b3b80d8