Page MenuHomePhabricator

[RewriteStatepointsForGC] Exclude constant values from being considered live at a safepoint
ClosedPublic

Authored by reames on Apr 23 2015, 4:29 PM.

Details

Summary

There can be various constant pointers in the IR which do not get relocated at a safepoint. One example is the address of a global variable. Another example is a pointer created via inttoptr. Note that the optimizer itself likes to create such inttoptrs when locally propagating constants through dynamically dead code.

To deal with this, we need to exclude uses of constants from contributing to the liveness of a safepoint which might reach that use. At some later date, it might be worth exploring what could be done to support the relocation of various special types of "constants", but that's future work.

Diff Detail

Repository
rL LLVM

Event Timeline

reames updated this revision to Diff 24340.Apr 23 2015, 4:29 PM
reames updated this revision to Diff 24342.
reames retitled this revision from to [RewriteStatepointsForGC] Exclude constant values from being considered live at a safepoint.
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).

Upload the diff again to force an email after adding llvm-commits.

Full description copied by hand in case it doesn't get resent.

[RewriteStatepointsForGC] Exclude constant values from being considered live at a safepoint

There can be various constant pointers in the IR which do not get relocated at a safepoint. One example is the address of a global variable. Another example is a pointer created via inttoptr. Note that the optimizer itself likes to create such inttoptrs when locally propagating constants through dynamically dead code.

To deal with this, we need to exclude uses of constants from contributing to the liveness of a safepoint which might reach that use. At some later date, it might be worth exploring what could be done to support the relocation of various special types of "constants", but that's future work.

sanjoy accepted this revision.Apr 23 2015, 5:15 PM
sanjoy edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Apr 23 2015, 5:15 PM
swaroop.sridhar accepted this revision.Apr 23 2015, 5:21 PM
swaroop.sridhar edited edge metadata.
This revision was automatically updated to reflect the committed changes.