This is an archive of the discontinued LLVM Phabricator instance.

[gc.statepoint] Change gc.statepoint intrinsic's return type to token type instead of i32 type
ClosedPublic

Authored by chenli on Dec 18 2015, 9:43 PM.

Details

Summary

This patch changes gc.statepoint intrinsic's return type to token type instead of i32 type. Using token types could prevent LLVM to merge different gc.statepoint nodes into PHI nodes and cause further problems with gc relocations. The patch also changes the way on how gc.relocate and gc.result look for their corresponding gc.statepoint on unwind path. The current implementation uses the selector value extracted from a { i8*, i32 } landingpad as a hook to find the gc.statepoint, while the patch directly uses a token type landingpad (http://reviews.llvm.org/D15405) to find the gc.statepoint.

Diff Detail

Event Timeline

chenli updated this revision to Diff 43295.Dec 18 2015, 9:43 PM
chenli retitled this revision from to [gc.statepoint] Change gc.statepoint intrinsic's return type to token type instead of i32 type.
chenli updated this object.
chenli added a subscriber: llvm-commits.
mjacob added a subscriber: mjacob.Dec 21 2015, 2:32 PM
igor-laevsky accepted this revision.Dec 22 2015, 7:05 AM
igor-laevsky edited edge metadata.

Looks good. (I didn't carefully read through all the test changes so I am assuming that they are all replacing i32 with token type).

This revision is now accepted and ready to land.Dec 22 2015, 7:05 AM
mjacob accepted this revision.Dec 22 2015, 8:36 AM
mjacob added a reviewer: mjacob.

LGTM, too. I skimmed over the tests, and they seem to be fine. I can't comment on the invoke-related changes, though.

include/llvm/IR/Intrinsics.td
582–586

These should either be updated or removed before committing this revision. I'd prefer the last option because these intrinsics were deprecated about 11 months ago. I'll prepare a revision for that.

reames added a subscriber: reames.Dec 22 2015, 10:25 AM

LGTM

include/llvm/IR/Intrinsics.td
582–586

Agreed.

chenli closed this revision.Dec 25 2015, 11:57 PM
This revision was automatically updated to reflect the committed changes.