This is an archive of the discontinued LLVM Phabricator instance.

Use a pointer type for target frame indices during statepoint lowering
ClosedPublic

Authored by sanjoy on Apr 19 2017, 4:28 PM.

Details

Summary

The type of the target frame index is intptr, not the type of the value we're
going to store into it. Without this change we crash in the attached test case
when trying to type-legalize a TargetFrameIndex.

Patchpoint lowering types the target frame index as intptr as well.

Event Timeline

sanjoy created this revision.Apr 19 2017, 4:28 PM
arsenm added a subscriber: arsenm.Apr 19 2017, 4:31 PM

See D32021, after that is committed this should use getFrameIndexTy

See D32021, after that is committed this should use getFrameIndexTy

Thanks for the tip! I'll rebase once that lands.

reames edited edge metadata.Apr 20 2017, 6:13 PM

Can you explain why it's correct to use the pointer type in this one call to getTargetFrameIndex and not the 4 other ones in the same file? I'm a bit confused here.

sanjoy planned changes to this revision.Apr 20 2017, 6:38 PM

Can you explain why it's correct to use the pointer type in this one call to getTargetFrameIndex and not the 4 other ones in the same file? I'm a bit confused here.

Yes, they need to be fixed too.

sanjoy updated this revision to Diff 96864.Apr 26 2017, 8:50 PM
  • address review
arsenm accepted this revision.Apr 27 2017, 10:16 AM

LGTM

This revision is now accepted and ready to land.Apr 27 2017, 10:16 AM
This revision was automatically updated to reflect the committed changes.