Skip to content

[SUA][Coroutines] Change LLVM's Coroutine lowering to allow for and use extra hash parameter to llvm.coro.id.retcon.once and llvm.coro.id.retcon #10015

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
merged 4 commits into from
Feb 14, 2025

Conversation

t-rasmud
Copy link

Change the signatures of llvm.coro.id.retcon.once and llvm.coro.id.retcon to pass a hash parameter as a variable argument. This change will allow IRGen to pass the new runtime function swift_coroFrameAlloc (which calls the typed allocator if TMO is enabled) along with a type hash to these two intrinsics.

rdar://141236876

…se extra hash parameter to llvm.coro.id.retcon.once and llvm.coro.id.retcon

Change the signatures of llvm.coro.id.retcon.once and llvm.coro.id.retcon to pass a hash parameter as a variable argument.
This change will allow IRGen to pass the new runtime function swift_coroFrameAlloc (which calls the typed allocator if TMO is enabled)
along with a type hash to these two intrinsics.

rdar://141236876
@t-rasmud
Copy link
Author

@swift-ci test

Copy link

@aschwaighofer aschwaighofer left a comment

Choose a reason for hiding this comment

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

Looks good.

I did not see a test case that tests the newly added code to emit a call to an allocator which has a typeid argument. Did I miss it? If not miss it please add a test case.

Copy link

@aschwaighofer aschwaighofer left a comment

Choose a reason for hiding this comment

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

LGTM

@aschwaighofer
Copy link

@swift-ci test llvm

@t-rasmud
Copy link
Author

Merging the PR. Happy to address any post-commit feedback.

@t-rasmud t-rasmud merged commit fe25ae6 into next Feb 14, 2025
@t-rasmud t-rasmud deleted the tmo-coroutine-lowering branch February 14, 2025 00:30
t-rasmud added a commit that referenced this pull request Feb 16, 2025
…se extra hash parameter to llvm.coro.id.retcon.once and llvm.coro.id.retcon (#10015)

[SUA][Coroutines] Change LLVM's Coroutine lowering to allow for and use extra hash parameter to llvm.coro.id.retcon.once and llvm.coro.id.retcon

Change the signatures of llvm.coro.id.retcon.once and llvm.coro.id.retcon to pass a hash parameter as a variable argument.
This change will allow IRGen to pass the new runtime function swift_coroFrameAlloc (which calls the typed allocator if TMO is enabled)
along with a type hash to these two intrinsics.

rdar://141236876
(cherry picked from commit fe25ae6)
bnbarham added a commit that referenced this pull request Feb 22, 2025
[SUA][Coroutines] Change LLVM's Coroutine lowering to allow for and use extra hash parameter to llvm.coro.id.retcon.once and llvm.coro.id.retcon (#10015)
t-rasmud added a commit that referenced this pull request Mar 19, 2025
…once intrinsic

The signature of coro.id.retcon.once intrinsic was modified in #10015
with an extra vararg. This commit adds an auto upgrader to LLVM in order to be compatible with compilers
generating old bitcode (intrinsic without the vararg).

rdar://147426562
t-rasmud added a commit that referenced this pull request Mar 21, 2025
…once intrinsic

The signature of coro.id.retcon.once intrinsic was modified in #10015
with an extra vararg. This commit adds an auto upgrader to LLVM in order to be compatible with compilers
generating old bitcode (intrinsic without the vararg).

rdar://147426562
(cherry picked from commit bb25095)
t-rasmud added a commit that referenced this pull request Mar 22, 2025
…once intrinsic

The signature of coro.id.retcon.once intrinsic was modified in #10015
with an extra vararg. This commit adds an auto upgrader to LLVM in order to be compatible with compilers
generating old bitcode (intrinsic without the vararg).

rdar://147426562
t-rasmud added a commit that referenced this pull request Mar 25, 2025
…once intrinsic

The signature of coro.id.retcon.once intrinsic was modified in #10015
with an extra vararg. This commit adds an auto upgrader to LLVM in order to be compatible with compilers
generating old bitcode (intrinsic without the vararg).

rdar://147426562
(cherry picked from commit bb25095)
t-rasmud added a commit that referenced this pull request Apr 7, 2025
…once intrinsic

The signature of coro.id.retcon.once intrinsic was modified in #10015
with an extra vararg. This commit adds an auto upgrader to LLVM in order to be compatible with compilers
generating old bitcode (intrinsic without the vararg).

rdar://147426562
(cherry picked from commit bb25095)
t-rasmud added a commit that referenced this pull request Apr 25, 2025
…once intrinsic

The signature of coro.id.retcon.once intrinsic was modified in #10015
with an extra vararg. This commit adds an auto upgrader to LLVM in order to be compatible with compilers
generating old bitcode (intrinsic without the vararg).

rdar://147426562
(cherry picked from commit 969660b)
(cherry picked from commit 2eaa148)
(cherry picked from commit 889ce26)
(cherry picked from commit 031baa1)
(cherry picked from commit 98dd062)
t-rasmud added a commit that referenced this pull request Apr 27, 2025
…once intrinsic

The signature of coro.id.retcon.once intrinsic was modified in #10015
with an extra vararg. This commit adds an auto upgrader to LLVM in order to be compatible with compilers
generating old bitcode (intrinsic without the vararg).

rdar://147426562
(cherry picked from commit 969660b)
(cherry picked from commit 2eaa148)
(cherry picked from commit 889ce26)
(cherry picked from commit 031baa1)
(cherry picked from commit 98dd062)
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