This is an archive of the discontinued LLVM Phabricator instance.

Add a "gc-transition" operand bundle
ClosedPublic

Authored by sanjoy on Jan 19 2016, 6:49 PM.

Details

Summary

This adds a new kind of operand bundle to LLVM denoted by the
"gc-transition" tag. Inputs to "gc-transition" operand bundle are
lowered into the "transition args" section of gc.statepoint by
RewriteStatepointsForGC.

This removes the last bit of functionality that was unsupported in the
deopt bundle based code path in RewriteStatepointsForGC.

The documentation for this operand bundle type is basically a TODO --
I'm hoping someone from the LLILC team can guide me towards what
should be put on the LangRef or add something in a subsequent commit.

Diff Detail

Repository
rL LLVM

Event Timeline

sanjoy updated this revision to Diff 45334.Jan 19 2016, 6:49 PM
sanjoy retitled this revision from to Add a "gc-transition" operand bundle.
sanjoy updated this object.
sanjoy added reviewers: pgavlin, JosephTremoulet, reames.
sanjoy added a subscriber: llvm-commits.
pgavlin edited edge metadata.Jan 20 2016, 10:34 AM

LGTM aside from a few nits. Some suggested docs are above.

docs/LangRef.rst
1609 ↗(On Diff #45334)

I'd suggest something like:

GC transition operand bundles are characterized by the
``"gc-transition"`` operand bundle tag. These operand
bundles mark a call as a transition between a function
with one GC strategy to a function with a different GC
strategy. If coordinating the transition between GC
strategies requires additional code generation at the
call site, these bundles may contain any values that
are needed by the generated code.

It may also be helpful to link to the "GC Transitions" section of the Statepoints doc.

lib/IR/Verifier.cpp
2516 ↗(On Diff #45334)

Nit: this comment needs updating for GC transition bundles.

2526 ↗(On Diff #45334)

Nit: this if statement and its successor could be else if clauses.

This revision was automatically updated to reflect the committed changes.