Commit Graph

113204 Commits

Author SHA1 Message Date
Philip Reames
2fc495a300 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
2015-02-10 00:04:53 +00:00
Aaron Ballman
c0cd86712c 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
2015-02-10 00:00:54 +00:00
Adrian Prantl
8abe95ce83 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
2015-02-09 23:57:22 +00:00
Adrian Prantl
4f1b7f3100 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
2015-02-09 23:57:15 +00:00
Colin LeMahieu
76419c0533 [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
2015-02-09 23:45:24 +00:00
Duncan P. N. Exon Smith
a9a077681d 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
2015-02-09 23:21:05 +00:00
Aaron Ballman
b9df444409 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
2015-02-09 23:11:39 +00:00
Colin LeMahieu
f7d4569298 [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
2015-02-09 23:05:44 +00:00
Ramkumar Ramachandra
4ee0217aee [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
2015-02-09 23:02:10 +00:00
Ramkumar Ramachandra
69a5c89128 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
2015-02-09 23:00:40 +00:00
Duncan P. N. Exon Smith
99cc7e5307 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
2015-02-09 22:48:04 +00:00
Philip Reames
9a61a8236f 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
2015-02-09 22:44:03 +00:00
Philip Reames
2b9d3c4186 Use range for loops in PlaceSafepoints (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228620 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-09 22:26:11 +00:00
Duncan P. N. Exon Smith
a30b342b77 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
2015-02-09 22:13:27 +00:00
Philip Reames
d3f3d5f0d7 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
2015-02-09 22:10:15 +00:00
Chris Bieneman
ad83329ce5 Revert "Raising minimum required CMake version to 2.8.12.2."
This reverts commit add62ac537.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228616 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-09 22:07:49 +00:00
Chris Bieneman
add62ac537 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
2015-02-09 22:05:07 +00:00
Colin LeMahieu
3bddb8b918 [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
2015-02-09 21:56:37 +00:00
Philip Reames
2eace6ebc5 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
2015-02-09 21:50:31 +00:00
Ramkumar Ramachandra
c904d5075f 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
2015-02-09 21:50:03 +00:00
Philip Reames
c016fa420f 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
2015-02-09 21:48:05 +00:00
Duncan P. N. Exon Smith
556548b7c1 Verifier: Const-qualify Metadata, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228609 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-09 21:30:05 +00:00
Duncan P. N. Exon Smith
edbd61d999 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
2015-02-09 21:26:34 +00:00
Duncan P. N. Exon Smith
e36616decc 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
2015-02-09 21:23:34 +00:00
Ramkumar Ramachandra
ba59efdfc8 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
2015-02-09 21:08:03 +00:00
Colin LeMahieu
4b97d2ca91 [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
2015-02-09 21:07:35 +00:00
Ben Langmuir
ea280d963d 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
2015-02-09 20:34:24 +00:00
Colin LeMahieu
6194244842 [Hexagon] Factoring classes out of store patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228602 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-09 20:33:46 +00:00
Colin LeMahieu
1c29f28bac [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
2015-02-09 20:03:42 +00:00
Ramkumar Ramachandra
46b30b8252 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
2015-02-09 19:49:54 +00:00
Sanjoy Das
c253e7fe56 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
2015-02-09 19:39:00 +00:00
Colin LeMahieu
e17141f9f3 [Hexagon] Cleaning up definition formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228593 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-09 19:24:44 +00:00
Sanjoy Das
af30d1e97a 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
2015-02-09 18:44:42 +00:00
Sanjoy Das
2ceba77dfa 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
2015-02-09 18:34:55 +00:00
Lang Hames
5a81520668 [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
2015-02-09 18:16:43 +00:00
Sanjay Patel
93411cf4f8 fixed to test features, not CPUs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228581 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-09 17:17:09 +00:00
Kit Barton
f60b0de42a 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
2015-02-09 17:03:18 +00:00
Sanjay Patel
50c61d2569 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
2015-02-09 16:30:58 +00:00
Sanjay Patel
eed74400b1 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
2015-02-09 16:04:52 +00:00
Johannes Doerfert
f8c4fd6005 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
2015-02-09 12:34:23 +00:00
Lang Hames
7e44cee3e6 [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
2015-02-09 07:47:32 +00:00
Lang Hames
9759a273fd [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
2015-02-09 07:22:56 +00:00
Akira Hatanaka
522cf235e9 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
2015-02-09 06:38:23 +00:00
David Majnemer
3c1b9d53d0 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
2015-02-09 06:31:31 +00:00
Lang Hames
cda59be931 [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
2015-02-09 04:46:41 +00:00
Craig Topper
cc5e6d56fc [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
2015-02-09 04:04:53 +00:00
Craig Topper
bd477dfbbf [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
2015-02-09 04:04:50 +00:00
Tim Northover
968ed6a5f0 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
2015-02-09 01:21:00 +00:00
Tim Northover
c4af8c9467 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
2015-02-09 01:20:53 +00:00
Lang Hames
7d5ae5bc1f [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
2015-02-09 01:20:51 +00:00