This is an archive of the discontinued LLVM Phabricator instance.

[PlaceSafepoints] New attributes for patchable statepoints.
ClosedPublic

Authored by sanjoy on May 12 2015, 11:59 PM.

Details

Summary

This patch teaches the PlaceSafepoints pass about two CallSite
function attributes:

  • "statepoint-id": if the string value of this attribute can be parsed as an integer, then it is propagated to the ID parameter of the statepoint created.
  • "statepoint-num-patch-bytes": if the string value of this attribute can be parsed as an integer, then it is propagated to the num patch bytes parameter of the statepoint created.

This change intentionally does not assert on a malformed value for these
attributes, given that they're not "official" attributes.

Diff Detail

Repository
rL LLVM

Event Timeline

sanjoy updated this revision to Diff 25663.May 12 2015, 11:59 PM
sanjoy retitled this revision from to [PlaceSafepoints] New attributes for patchable statepoints..
sanjoy updated this object.
sanjoy edited the test plan for this revision. (Show Details)
sanjoy added reviewers: reames, pgavlin.
sanjoy added a subscriber: Unknown Object (MLST).
pgavlin requested changes to this revision.May 13 2015, 10:46 AM
pgavlin edited edge metadata.

It would be nice to have documentation for these attributes somewhere.

lib/Transforms/Scalar/PlaceSafepoints.cpp
908–911 ↗(On Diff #25663)

Are these attributes propagated by PlaceSafepoints? If so, should they be dropped instead? I don't necessarily see any reason to drop them; just wondering if this was considered.

This revision now requires changes to proceed.May 13 2015, 10:46 AM
sanjoy added inline comments.May 13 2015, 12:41 PM
lib/Transforms/Scalar/PlaceSafepoints.cpp
908–911 ↗(On Diff #25663)

I think dropping them is a good idea, if nothing else, it makes the intent more obvious.

sanjoy updated this revision to Diff 25723.May 13 2015, 12:42 PM
sanjoy edited edge metadata.
  • address review: drop attributes once they're no longer needed.
  • address review: docs
pgavlin accepted this revision.May 13 2015, 12:53 PM
pgavlin edited edge metadata.

LGTM. Thanks for the updates.

This revision is now accepted and ready to land.May 13 2015, 12:53 PM
This revision was automatically updated to reflect the committed changes.