[PATCH] D23461: [Coroutines] Part 7: Split coroutine into subfunctions

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 16 10:19:20 PDT 2016


majnemer accepted this revision.
majnemer added a comment.
This revision is now accepted and ready to land.

LGTM with nits :)


================
Comment at: lib/Transforms/Coroutines/CoroFrame.cpp:93
@@ +92,3 @@
+                                          "PostSpill");
+  // TODO: Insert geps for alloca moved to coroutine frame
+
----------------
Period.

================
Comment at: lib/Transforms/Coroutines/CoroFrame.cpp:100
@@ +99,3 @@
+  SpillInfo Spills;
+  // TODO: Compute Spills (incoming in later patches)
+
----------------
Ditto.

================
Comment at: lib/Transforms/Coroutines/CoroInternal.h:90
@@ +89,3 @@
+
+// Defined in CoroFrame.cpp
+void buildCoroutineFrame(Function& F, Shape& Shape);
----------------
This comment is not very useful, I'd remove it.

================
Comment at: lib/Transforms/Coroutines/Coroutines.cpp:186-187
@@ +185,4 @@
+  Module *M = SuspendInst->getModule();
+  auto Fn = Intrinsic::getDeclaration(M, Intrinsic::coro_save);
+  auto SaveInst =
+      cast<CoroSaveInst>(CallInst::Create(Fn, CoroBegin, "", SuspendInst));
----------------
`auto *`


https://reviews.llvm.org/D23461





More information about the llvm-commits mailing list