[clang] [llvm] [coroutine] Implement llvm.coro.await.suspend intrinsic (PR #79712)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 4 03:14:18 PST 2024
================
@@ -1575,6 +1650,36 @@ static bool hasCallsBetween(Instruction *Save, Instruction *ResumeOrDestroy) {
return false;
}
+// Check if await-suspend helper is "simple".
+// The conditions are:
+// 1. The return result is exactly coroutine frame parameter, passed to helper
+// 2. There are no calls between any of the returns and helper entry that could
+// resume or destroy it
+// FIXME: perform more sophisiticated analysis?
+static bool isSimpleHelper(CoroAwaitSuspendInst *AWS) {
----------------
fpasserby wrote:
This method was added so that previously available optimization is not lost after this change. If you really feel this is too minor, I will remove it.
https://github.com/llvm/llvm-project/pull/79712
More information about the llvm-commits
mailing list