[PATCH] D23586: [Coroutines] Part 8: Coroutine Frame Building algorithm

Gor Nishanov via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 23 20:59:30 PDT 2016


GorNishanov marked 4 inline comments as done.

================
Comment at: lib/Transforms/Coroutines/CoroFrame.cpp:626-638
@@ +625,15 @@
+
+  for (Instruction &I : instructions(F)) {
+    // token returned by CoroSave is an artifact of how we build save/suspend
+    // pairs and should not be part of the Coroutine Frame
+    if (isa<CoroSaveInst>(&I))
+      continue;
+    // CoroBeginInst returns a handle to a coroutine which is passed as a sole
+    // parameter to .resume and .cleanup parts and should not go into coroutine
+    // frame.
+    if (isa<CoroBeginInst>(&I))
+      continue;
+
+    for (User *U : I.users())
+      if (Checker.isDefinitionAcrossSuspend(I, U)) {
+        assert(!materializable(I) &&
----------------
majnemer wrote:
> Can an EHPad be across a suspend?
Not supported. I added a report_fatal_error.



https://reviews.llvm.org/D23586





More information about the llvm-commits mailing list