This is an archive of the discontinued LLVM Phabricator instance.

[RewriteStatepointsForGC] Limited support for vectors of pointers
ClosedPublic

Authored by reames on Mar 27 2015, 1:42 PM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

reames updated this revision to Diff 22814.Mar 27 2015, 1:42 PM
reames retitled this revision from to [RewriteStatepointsForGC] Limited support for vectors of pointers.
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).
sanjoy edited edge metadata.Mar 27 2015, 3:33 PM

Mostly stylistic issues.

lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
179 ↗(On Diff #22814)

Nit: variable naming, should be Instruction *Loc

1802 ↗(On Diff #22814)

Why not for (Instruction *UI : Users) {?

1894 ↗(On Diff #22814)

Range for loop here?

sanjoy accepted this revision.Mar 27 2015, 3:33 PM
sanjoy edited edge metadata.
This revision is now accepted and ready to land.Mar 27 2015, 3:33 PM
This revision was automatically updated to reflect the committed changes.