Skip to content

[Coro] Add variant of retcon.once ABI. #10120

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

@nate-chandler nate-chandler commented Feb 26, 2025

Like async coroutines, its fixed-per-function-size frame is caller allocated--the size is stored in a global "coro function pointer".

Like retcon coroutines, dynamic allocations are performed via intrinsic-provided allocation and deallocation functions.

Unlike both, it takes an allocator struct as an argument which is forwarded to the allocation/deallocation functions.

case coro::ABI::Async:
llvm_unreachable("can't allocate memory in coro async-lowering");
}
llvm_unreachable("Unknown coro::ABI enum");
auto Dealloc = RetconLowering.Dealloc;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we consistently check that the switch over ABI is covered. If so I would not regress that.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

Like async coroutines, it's fixed-per-function-size frame is caller
allocated--the size is stored in a global "coro function pointer".

Like retcon coroutines, dynamic allocations are performed via
intrinsic-provided allocation and deallocation functions.

Unlike both, it takes an allocator struct as an argument which is
forwarded to the allocation/deallocation functions.
@nate-chandler
Copy link
Author

@swift-ci test llvm

@nate-chandler
Copy link
Author

@swift-ci test

@nate-chandler nate-chandler marked this pull request as ready for review February 27, 2025 05:26
@nate-chandler nate-chandler requested a review from a team as a code owner February 27, 2025 05:26
@nate-chandler nate-chandler merged commit a3e32cd into swiftlang:stable/20240723 Feb 27, 2025
5 checks passed
@nate-chandler nate-chandler deleted the coro-retcon-dynamic branch February 27, 2025 05:26
nate-chandler added a commit that referenced this pull request Mar 13, 2025
It became uncovered in
#10120 .  Fix that here.
bnbarham pushed a commit to bnbarham/llvm-project that referenced this pull request Apr 21, 2025
It became uncovered in
swiftlang#10120 .  Fix that here.

(cherry picked from commit 82d3bcd)
bnbarham pushed a commit to bnbarham/llvm-project that referenced this pull request Apr 22, 2025
It became uncovered in
swiftlang#10120 .  Fix that here.

(cherry picked from commit 82d3bcd)
bnbarham pushed a commit to bnbarham/llvm-project that referenced this pull request Apr 23, 2025
It became uncovered in
swiftlang#10120 .  Fix that here.

(cherry picked from commit 82d3bcd)
bnbarham pushed a commit to bnbarham/llvm-project that referenced this pull request Apr 23, 2025
It became uncovered in
swiftlang#10120 .  Fix that here.

(cherry picked from commit 82d3bcd)
bnbarham pushed a commit that referenced this pull request Apr 23, 2025
It became uncovered in
#10120 .  Fix that here.

(cherry picked from commit 82d3bcd)
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