[clang] [llvm] [coroutine] Implement llvm.coro.await.suspend intrinsic (PR #79712)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 29 15:43:57 PST 2024
fpasserby wrote:
Thank you for replying so quickly.
Your suggestion about `IsSuspendNoThrow` makes sense, it's totally possible to perform the check during codegen.
About `helperFunction` - this is how I understood the comment in `SemaCoroutine.cpp` near the place where `std::coroutine_handle::address()` is marked as always inline. As far as I can see, it makes perfect sense to hide all the temporary objects till coroutine frame is formed, given the history of optimizations and sanitizers messing it up. For example, current implementation seems to work correctly with the reproducer from #72006.
For other suggestions - I hope, I've fixed up AST serialization and added some documentation. Will add LLVM transformation tests a bit later.
https://github.com/llvm/llvm-project/pull/79712
More information about the cfe-commits
mailing list