This is an archive of the discontinued LLVM Phabricator instance.

[Coroutines] Allow FramePtr to be an Argument
ClosedPublic

Authored by nikic on Mar 4 2022, 6:17 AM.

Details

Reviewers
ChuanqiXu
lxfind
Group Reviewers
Restricted Project
Commits
rG9bca4ea364dd: [Coroutines] Allow FramePtr to be an Argument
Summary

With opaque pointers, after splitRetconCoroutine() the FramePtr may be an Argument rather than an Instruction. With typed pointers, this currently doesn't happen because the FramePtr would be a bitcast instruction.

Fix this by making FramePtr a Value and adding a helper for the "after FramePtr" insertion pointer, which would be the start of the function in the Argument case.

Diff Detail

Event Timeline

nikic created this revision.Mar 4 2022, 6:17 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 4 2022, 6:17 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
nikic requested review of this revision.Mar 4 2022, 6:17 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 4 2022, 6:17 AM
ChuanqiXu accepted this revision.Mar 6 2022, 6:09 PM

LGTM except a nit.

llvm/lib/Transforms/Coroutines/CoroInternal.h
270

I prefer getInsertPtAfterFramePtr.

This revision is now accepted and ready to land.Mar 6 2022, 6:09 PM
This revision was landed with ongoing or failed builds.Mar 7 2022, 1:59 AM
This revision was automatically updated to reflect the committed changes.
nikic marked an inline comment as done.