-
Notifications
You must be signed in to change notification settings - Fork 14.2k
[Coro] [async] Disable inlining in async coroutine splitting for swifttailcc thunks #87549
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
base: main
Are you sure you want to change the base?
[Coro] [async] Disable inlining in async coroutine splitting for swifttailcc thunks #87549
Conversation
@llvm/pr-subscribers-llvm-transforms @llvm/pr-subscribers-coroutines Author: Arnold Schwaighofer (aschwaighofer) ChangesThe call to the inlining utility does not update the call graph. Leading to assertion failures when calling the call graph utility to update the call graph. Instead rely on an inline pass to run after coro splitting and use alwaysinline annotations. We can only do this if the calling convention used for the thunks is Previous instance of this PR was #80904. github.com/swiftlang/swift/issues/68708 Full diff: https://github.com/llvm/llvm-project/pull/87549.diff 3 Files Affected:
|
279585a
to
84003e2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Do you mind adding the test case I had included in the revert commit?
Also, I am concerned that this basically only fixes the bug for Swift. Would other clients of the async coroutines still experience the out-of-date callgraph?
…ttailcc thunks The call to the inlining utility does not update the call graph. Leading to assertion failures when calling the call graph utility to update the call graph. Instead rely on an inline pass to run after coro splitting and use alwaysinline annotations. We can only do this if the calling convention used for the thunks is `swifttailcc` otherwise we would break clients that use other calling conventions. Previous instance of this PR was llvm#80904. github.com/swiftlang/swift/issues/68708
84003e2
to
500b937
Compare
@Mogball it only fixes it if ‘swifttailcc’ is used. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine with me and I'll keep that in mind, but it's unfortunate that the fix is forked based on the client of the coroutines....
The call to the inlining utility does not update the call graph. Leading to assertion failures when calling the call graph utility to update the call graph.
Instead rely on an inline pass to run after coro splitting and use alwaysinline annotations.
We can only do this if the calling convention used for the thunks is
swifttailcc
otherwise we would break clients that use other calling conventions.Previous instance of this PR was #80904.
github.com/swiftlang/swift/issues/68708