This is an archive of the discontinued LLVM Phabricator instance.

Don't Place Entry Safepoints Before the llvm.frameescape() Intrinsic
ClosedPublic

Authored by swaroop.sridhar on Apr 8 2015, 4:27 PM.

Details

Summary

llvm.frameescape() intrinsic is not a real call. The intrinsic can only exist in the entry block.
Inserting a gc.statepoint() before llvm.frameescape() may split the entry block, and push the intrinsic out of the entry block.

Diff Detail

Repository
rL LLVM

Event Timeline

swaroop.sridhar retitled this revision from to Don't Place Entry Safepoints Before the llvm.frameescape() Intrinsic.
swaroop.sridhar updated this object.
swaroop.sridhar edited the test plan for this revision. (Show Details)
swaroop.sridhar changed the visibility from "Public (No Login Required)" to "swaroop.sridhar (Swaroop Sridhar)".
swaroop.sridhar changed the visibility from "swaroop.sridhar (Swaroop Sridhar)" to "Public (No Login Required)".
swaroop.sridhar added a subscriber: Unknown Object (MLST).
reames accepted this revision.Apr 23 2015, 4:20 PM
reames edited edge metadata.

LGTM. Sorry for not getting to this review sooner. I managed not to see it.

Out of curiosity, why are you using frameescape with statepoints? Not a combination I would have expected.

This revision is now accepted and ready to land.Apr 23 2015, 4:20 PM

The llvm.frameescape() intrinsic is inserted by the LLILC JIT to ensure that some information about generics-context stays alive.
The MSIL reader allocates memory on the stack to hold the some scratch information and marks it address-escaped.

Can you please checkin this change for me? Thanks.

This revision was automatically updated to reflect the committed changes.