History log of /llvm-project/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp (Results 326 – 350 of 362)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 704e78b1 10-Apr-2015 Philip Reames <listmail@philipreames.com>

[RewriteStatepointsForGC] clang-format file

Format the entire file to reduce diff of change to follow.

llvm-svn: 234656


# f66d7370 10-Apr-2015 Philip Reames <listmail@philipreames.com>

[RewriteStatepointsForGC] Missed review comment from 234651 & build fix

After submitting 234651, I noticed I hadn't responded to a review comment by mjacob. This patch addresses that comment and fi

[RewriteStatepointsForGC] Missed review comment from 234651 & build fix

After submitting 234651, I noticed I hadn't responded to a review comment by mjacob. This patch addresses that comment and fixes a Release only build problem due to an unused variable.

llvm-svn: 234653

show more ...


# 85b36a81 10-Apr-2015 Philip Reames <listmail@philipreames.com>

[RewriteStatepointsForGC] Preprocess the IR to remove unreachable blocks and single entry phis

Two related small changes:

Various dominance based queries about liveness can get confused if we'r

[RewriteStatepointsForGC] Preprocess the IR to remove unreachable blocks and single entry phis

Two related small changes:

Various dominance based queries about liveness can get confused if we're talking about unreachable blocks. To avoid reasoning about such cases, just remove them before rewriting statepoints.
Remove single entry phis (likely left behind by LCSSA) to reduce the number of live values.

Both of these are motivated by http://reviews.llvm.org/D8674 which will be submitted shortly.

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

llvm-svn: 234651

show more ...


# 8531d8c4 10-Apr-2015 Philip Reames <listmail@philipreames.com>

[RewriteStatepointsForGC] Limited support for vectors of pointers

This patch adds limited support for inserting explicit relocations when there's a vector of pointers live over the statepoint. This

[RewriteStatepointsForGC] Limited support for vectors of pointers

This patch adds limited support for inserting explicit relocations when there's a vector of pointers live over the statepoint. This doesn't handle the case where the vector contains a mix of base and non-base pointers; that's future work.

The current implementation just scalarizes the vector over the gc.statepoint before doing the explicit rewrite. An alternate approach would be to plumb the vector all the way though the backend lowering, but doing that appears challenging. In particular, the size of the indirect spill slot is currently assumed to be sizeof(pointer) throughout the backend.

In practice, this is enough to allow running the SLP and Loop vectorizers before RewriteStatepointsForGC.

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

llvm-svn: 234647

show more ...


# a6ebf075 27-Mar-2015 Philip Reames <listmail@philipreames.com>

Code cleanup [NFC]

The assertion here was more expensive then it needed to be. We're only inserting allocas in the entry block, so we only need to consider ones in the entry block.

llvm-svn: 233362


# 24c6cd52 27-Mar-2015 Philip Reames <listmail@philipreames.com>

More code cleanup [NFC]

llvm-svn: 233361


# 18d0feb7 27-Mar-2015 Philip Reames <listmail@philipreames.com>

More code cleanup [NFC]

Minor naming, one potentially unsafe cast

llvm-svn: 233359


# aa66dfa0 27-Mar-2015 Philip Reames <listmail@philipreames.com>

Code simplification and style cleanup

All the removed assertions are either implied locally by the assert at the top of the function or properties of the verifier.

llvm-svn: 233358


Revision tags: llvmorg-3.5.2, llvmorg-3.5.2-rc1
# f044d3f9 09-Mar-2015 Benjamin Kramer <benny.kra@googlemail.com>

Make helper functions static.

Found by -Wmissing-prototypes. NFC.

llvm-svn: 231664


# 6da37857 04-Mar-2015 Philip Reames <listmail@philipreames.com>

[RewriteStatepointsForGC] Fix a relocation bug w.r.t values defined by invoke instructions

RewriteStatepointsForGC pass emits an alloca for each GC pointer which will be relocated. It then inserts s

[RewriteStatepointsForGC] Fix a relocation bug w.r.t values defined by invoke instructions

RewriteStatepointsForGC pass emits an alloca for each GC pointer which will be relocated. It then inserts stores after def and all relocations, and inserts loads before each use as well. In the end, mem2reg is used to update IR with relocations in SSA form.

However, there is a problem with inserting stores for values defined by invoke instructions. The code didn't expect a def was a terminator instruction, and inserting instructions after these terminators resulted in malformed IR.

This patch fixes this problem by handling invoke instructions as a special case. If the def is an invoke instruction, the store will be inserted at the beginning of the normal destination block. Since return value from invoke instruction does not dominate the unwind destination block, no action is needed there.

Patch by: Chen Li
Differential Revision: http://reviews.llvm.org/D7923

llvm-svn: 231183

show more ...


# 94690723 03-Mar-2015 David Blaikie <dblaikie@gmail.com>

RewriteStatepointsForGC::PhiState: Remove explicit copy ctor in favor of the Rule of Zero

The assertion was just checking a class invariant that's pretty easy to
verify by inspection (no mutating op

RewriteStatepointsForGC::PhiState: Remove explicit copy ctor in favor of the Rule of Zero

The assertion was just checking a class invariant that's pretty easy to
verify by inspection (no mutating operations, and the two non-copy ctors
already ensure the state is maintained) so remove the explicit copy ctor
in favor of the default, thus allowing the use of the default copy
assignment operator without hitting the C++11 deprecation here.

llvm-svn: 231143

show more ...


# 7f1e0565 03-Mar-2015 David Blaikie <dblaikie@gmail.com>

Revert "Remove the explicit SDNodeIterator::operator= in favor of the implicit default"

Accidentally committed a few more of these cleanup changes than
intended. Still breaking these out & tidying t

Revert "Remove the explicit SDNodeIterator::operator= in favor of the implicit default"

Accidentally committed a few more of these cleanup changes than
intended. Still breaking these out & tidying them up.

This reverts commit r231135.

llvm-svn: 231136

show more ...


# bb8da4c0 03-Mar-2015 David Blaikie <dblaikie@gmail.com>

Remove the explicit SDNodeIterator::operator= in favor of the implicit default

There doesn't seem to be any need to assert that iterator assignment is
between iterators over the same node - if you w

Remove the explicit SDNodeIterator::operator= in favor of the implicit default

There doesn't seem to be any need to assert that iterator assignment is
between iterators over the same node - if you want to reuse an iterator
variable to iterate another node, that's perfectly acceptable. Just
don't mix comparisons between iterators into disjoint sequences, as
usual.

llvm-svn: 231135

show more ...


# 42a7adf1 28-Feb-2015 Yaron Keren <yaron.keren@gmail.com>

Silence variable set but not used warning, NFC.

llvm-svn: 230848


# 28e61ce6 28-Feb-2015 Philip Reames <listmail@philipreames.com>

[RewriteStatepointsForGC] Reduce indentation via early continue [NFC]

llvm-svn: 230836


# 2e5bcbe8 28-Feb-2015 Philip Reames <listmail@philipreames.com>

[RewriteStatepointsForGC] Fix another order of iteration bug

It turns out the naming of inserted phis and selects is sensative to the order in which two sets are iterated. We need to nail this down

[RewriteStatepointsForGC] Fix another order of iteration bug

It turns out the naming of inserted phis and selects is sensative to the order in which two sets are iterated. We need to nail this down to avoid non-deterministic output and possible test failures.

The modified test is the one I first noticed something odd in. The change is making it more strict to report the error. With the test change, but without the code change, the test fails roughly 1 in 5. With the code change, I've run ~30 runs without error.

Long term, the right fix here is to adjust the naming scheme. I'm checking in this hack to avoid any possible non-determinism in the tests over the weekend. HJust because I only noticed one case doesn't mean it's actually the only case. I hope to get to the right change Monday.

std->llvm data structure changes bugfix change #3

llvm-svn: 230835

show more ...


# f986d68b 28-Feb-2015 Philip Reames <listmail@philipreames.com>

[RewriteStatepointsForGC] Reduce indentation via early continue [NFC]

llvm-svn: 230829


# a226e611 28-Feb-2015 Philip Reames <listmail@philipreames.com>

[RewriteStatepointsForGC] Fix iterator invalidation bug

Inserting into a DenseMap you're iterating over is not well defined. This is unfortunate since this is well defined on a std::map.

"cleanup

[RewriteStatepointsForGC] Fix iterator invalidation bug

Inserting into a DenseMap you're iterating over is not well defined. This is unfortunate since this is well defined on a std::map.

"cleanup per llvm code style standards" bug #2

llvm-svn: 230827

show more ...


# a5aeaf4b 28-Feb-2015 Philip Reames <listmail@philipreames.com>

[RewriteStatepointsForGC] Add tests for the base pointer identification algorithm

These tests cover the 'base object' identification and rewritting portion of RewriteStatepointsForGC. These aren't

[RewriteStatepointsForGC] Add tests for the base pointer identification algorithm

These tests cover the 'base object' identification and rewritting portion of RewriteStatepointsForGC. These aren't completely exhaustive, but they've proven to be reasonable effective over time at finding regressions.

In the process of porting these tests over, I found my first "cleanup per llvm code style standards" bug. We were relying on the order of iteration when testing the base pointers found for a derived pointer. When we switched from std::set to DenseSet, this stopped being a safe assumption. I'm suspecting I'm going to find more of those. In particular, I'm now really wondering about the main iteration loop for this algorithm. I need to go take a closer look at the assumptions there.

I'm not really happy with the fact these are testing what is essentially debug output (i.e. enabled via command line flags). Suggestions for how to structure this better are very welcome.

llvm-svn: 230818

show more ...


Revision tags: llvmorg-3.6.0
# 5e5d7840 22-Feb-2015 David Blaikie <dblaikie@gmail.com>

Roll condition into an assert then wrap it 'ifndef NDEBUG' to protect from the inevitable "unused variable" warning in a non-asserts build.

llvm-svn: 230181


# f7d08f6d 22-Feb-2015 NAKAMURA Takumi <geek4civic@gmail.com>

RewriteStatepointsForGC.cpp: Fix for -Asserts to mark isNullConstant() as LLVM_ATTRIBUTE_UNUSED. [-Wunused-function]

llvm-svn: 230169


# 02aa295a 22-Feb-2015 NAKAMURA Takumi <geek4civic@gmail.com>

RewriteStatepointsForGC.cpp: Fix for -Asserts. [-Wunused-variable]

llvm-svn: 230168


# 82ad7877 20-Feb-2015 David Blaikie <dblaikie@gmail.com>

Remove some unnecessary unreachables in favor of (sometimes implicit) assertions

Also simplify some else-after-return cases including some standard
algorithm convenience/use.

llvm-svn: 230094


# 1f017547 20-Feb-2015 Philip Reames <listmail@philipreames.com>

[RewriteStatepointsForGC] Use DenseSet in place of std::set [NFC]

This should be the last cleanup on non-llvm preferred data structures. I left one use of std::set in an assertion; DenseSet didn't

[RewriteStatepointsForGC] Use DenseSet in place of std::set [NFC]

This should be the last cleanup on non-llvm preferred data structures. I left one use of std::set in an assertion; DenseSet didn't seem to have a tombstone for CallSite defined. That might be worth fixing, but wasn't worth it for a debug only use.

llvm-svn: 230084

show more ...


# e9c3b9bd 20-Feb-2015 Philip Reames <listmail@philipreames.com>

[RewriteStatepointsForGC] Replace std::map with DenseMap

I'd done the work of extracting the typedef in a previous commit, but didn't actually change it. Hopefully this will make any subtle changes

[RewriteStatepointsForGC] Replace std::map with DenseMap

I'd done the work of extracting the typedef in a previous commit, but didn't actually change it. Hopefully this will make any subtle changes easier to isolate.

llvm-svn: 230081

show more ...


1...<<1112131415