[PATCH] D24242: [Coroutines] Part13: Handle single edge PHINodes across suspends

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 5 20:45:54 PDT 2016


majnemer added inline comments.

================
Comment at: lib/Transforms/Coroutines/CoroEarly.cpp:169-174
@@ -162,2 +168,8 @@
   }
+  // Make sure that all CoroFree reference the coro.id intrinsic.
+  // Token type is not exposed through coroutine C/C++ builtins to plain C, so
+  // we allow specifying none and fixing it up here.
+  if (CoroId)
+    for (CoroFreeInst *CF : CoroFrees)
+      CF->setArgOperand(0, CoroId);
   return Changed;
----------------
Can't the FE do this?


https://reviews.llvm.org/D24242





More information about the llvm-commits mailing list