Skip to content

[Coro] Adopt ret.popless intrinsic. #10179

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

nate-chandler
Copy link

Delete provisional coro.return intrinsic.

ahmedbougacha and others added 2 commits March 5, 2025 15:08
Marks the following ret instruction as a "popless" return, one that does
not not restore SP to its function-entry value (i.e., does not
deallocate the stack frame), allowing allocations made in the function
to be accessible by the caller.

The function must be annotated with an appropriate target-specific
calling convention, so the caller can generate stack accesses
accordingly, generally by treating the call as a variably-sized alloca,
so using FP-based addressing for its own frame rather than relying on
statically known SP offsets.

The single argument is forwarded as a return value, that must then be
used as the operand to the following ret instruction.

Calls to this intrinsic need to be musttail, but don't follow the other
ABI requirements for musttail calls, since this is really annotating the
ret.

This doesn't implement any lowering, but only adds the intrinsic
definition, basic verifier checks, and an inliner opt-out.

rdar://135984630
Delete provisional coro.return intrinsic.
@nate-chandler
Copy link
Author

swiftlang/swift#79811

@swift-ci test

@nate-chandler
Copy link
Author

@swift-ci test llvm

@nate-chandler
Copy link
Author

swiftlang/swift#79811

@swift-ci test

@nate-chandler nate-chandler marked this pull request as ready for review March 9, 2025 16:52
@nate-chandler nate-chandler requested a review from a team as a code owner March 9, 2025 16:52
@nate-chandler nate-chandler merged commit d9449c9 into swiftlang:stable/20240723 Mar 9, 2025
5 checks passed
@nate-chandler nate-chandler deleted the coro-ret-popless branch March 9, 2025 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants