Skip to content

Cherry-pick 51d5d7bbae92493a5bfa7cc6b519de8a5bb32fdb from LLVM mainline #7797

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 2 commits into from
Feb 7, 2024

Conversation

asl
Copy link

@asl asl commented Nov 15, 2023

Required for swiftlang/swift#69843

@asl
Copy link
Author

asl commented Nov 15, 2023

Please test with swiftlang/swift#69843
@swift-ci please test

@asl
Copy link
Author

asl commented Nov 15, 2023

Tagging @rxwei

@asl asl force-pushed the coro-retcon-once-return branch from 76cea32 to be89e73 Compare November 17, 2023 00:43
@asl
Copy link
Author

asl commented Nov 17, 2023

Please test with swiftlang/swift#69843
@swift-ci please test

@asl
Copy link
Author

asl commented Nov 17, 2023

Please test with swiftlang/swift#69843
@swift-ci please test Windows platform

3 similar comments
@asl
Copy link
Author

asl commented Nov 17, 2023

Please test with swiftlang/swift#69843
@swift-ci please test Windows platform

@asl
Copy link
Author

asl commented Nov 17, 2023

Please test with swiftlang/swift#69843
@swift-ci please test Windows platform

@asl
Copy link
Author

asl commented Nov 17, 2023

Please test with swiftlang/swift#69843
@swift-ci please test Windows platform

@asl asl force-pushed the coro-retcon-once-return branch from be89e73 to 5dcf7c0 Compare December 7, 2023 00:11
@asl
Copy link
Author

asl commented Dec 7, 2023

Please test with swiftlang/swift#69843
@swift-ci please test

@asl
Copy link
Author

asl commented Dec 7, 2023

Please test with swiftlang/swift#69843
@swift-ci please test macOS platform

@asl asl force-pushed the coro-retcon-once-return branch from 5dcf7c0 to 70b9470 Compare December 12, 2023 17:45
@asl
Copy link
Author

asl commented Dec 12, 2023

Please test with swiftlang/swift#69843
@swift-ci please test

@asl
Copy link
Author

asl commented Dec 13, 2023

Please test with swiftlang/swift#69843
@swift-ci please test windows platform

@asl asl force-pushed the coro-retcon-once-return branch from 70b9470 to 1a25f84 Compare December 15, 2023 19:37
@asl
Copy link
Author

asl commented Dec 15, 2023

Please test with swiftlang/swift#69843
@swift-ci please test

@asl
Copy link
Author

asl commented Dec 16, 2023

Please test with swiftlang/swift#69843
@swift-ci please test windows platform

@asl asl force-pushed the coro-retcon-once-return branch from 1a25f84 to fdf1a32 Compare December 22, 2023 23:35
@asl
Copy link
Author

asl commented Dec 23, 2023

Please test with swiftlang/swift#69843
@swift-ci please test

@asl asl force-pushed the coro-retcon-once-return branch from fdf1a32 to fb244ea Compare January 5, 2024 08:25
@asl
Copy link
Author

asl commented Jan 5, 2024

Please test with swiftlang/swift#69843
@swift-ci please test

@asl
Copy link
Author

asl commented Jan 5, 2024

Please test with swiftlang/swift#69843
@swift-ci please test windows platform

asl added 2 commits February 5, 2024 12:23
…al result (llvm#66333)

One of the main user of these kind of coroutines is swift. There yield-once (`retcon.once`) coroutines are used to temporary "expose" pointers to internal fields of various objects creating borrow scopes.

However, in some cases it might be useful also to allow these coroutines to produce a normal result, but there is no convenient way to represent this (as compared to switched-resume kind of coroutines where C++ `co_return`
is transformed to a member / callback call on promise object).

The extension is simple: we allow continuation function to have a non-void result and accept optional extra arguments via a special `llvm.coro.end.result` intrinsic that would essentially forward them as normal results.
@asl asl force-pushed the coro-retcon-once-return branch from fb244ea to 012b976 Compare February 5, 2024 20:23
@asl
Copy link
Author

asl commented Feb 6, 2024

Please test with swiftlang/swift#69843
@swift-ci please test windows platform

@asl
Copy link
Author

asl commented Feb 6, 2024

Please test with swiftlang/swift#69843
@swift-ci please test

1 similar comment
@asl
Copy link
Author

asl commented Feb 6, 2024

Please test with swiftlang/swift#69843
@swift-ci please test

@asl
Copy link
Author

asl commented Feb 6, 2024

Please test with swiftlang/swift#69843
@swift-ci please test macos platform

@asl
Copy link
Author

asl commented Feb 7, 2024

@rxwei Looks like I do not have write access here. Will you please merge this PR for me? This is LLVM counterpart of swiftlang/swift#69843

@jasonmolenda
Copy link

Hi @asl swift main isn't building because this isn't merged yet. Can you merge or revert swiftlang/swift#69843 ? thanks.

@asl
Copy link
Author

asl commented Feb 7, 2024

@jasonmolenda I realized that I do not have write access to apple/llvm-project after I merged swiftlang/swift#69843

Will you please merge this PR for me?

Thanks!

@jasonmolenda jasonmolenda merged commit edc44d7 into swiftlang:stable/20230725 Feb 7, 2024
@asl
Copy link
Author

asl commented Feb 7, 2024

@jasonmolenda Thanks a lot!

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