This is an archive of the discontinued LLVM Phabricator instance.

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

Authored by reames on Mar 27 2015, 3:03 PM.

Details

Summary

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, but are not actually dependent on that.

Diff Detail

Repository
rL LLVM

Event Timeline

reames updated this revision to Diff 22824.Mar 27 2015, 3:03 PM
reames retitled this revision from to [RewriteStatepointsForGC] Preprocess the IR to remove unreachable blocks and single entry phis.
reames updated this object.
reames edited the test plan for this revision. (Show Details)
reames added reviewers: sanjoy, swaroop.sridhar.
reames added a subscriber: Unknown Object (MLST).

Change looks good to me, thanks.

mjacob added a subscriber: mjacob.Mar 28 2015, 7:02 AM
mjacob added inline comments.
lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
1912 ↗(On Diff #22824)

This variable should just record whether there is an unreachable statepoint.

This revision was automatically updated to reflect the committed changes.