[PATCH] D24408: [Coroutines] Part14: Handle coroutines with no suspend points.
David Majnemer via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 25 17:42:50 PDT 2016
majnemer added inline comments.
================
Comment at: lib/Transforms/Coroutines/CoroSplit.cpp:374
@@ +373,3 @@
+ auto *Frame = Builder.CreateAlloca(FrameTy);
+ auto *vFrame = Builder.CreateBitCast(Frame, Builder.getInt8PtrTy());
+ AllocInst->replaceAllUsesWith(Builder.getFalse());
----------------
`vFrame` does not matching our coding style.
================
Comment at: lib/Transforms/Coroutines/CoroSplit.cpp:378-379
@@ +377,4 @@
+ CoroBegin->replaceAllUsesWith(vFrame);
+ } else
+ CoroBegin->replaceAllUsesWith(CoroBegin->getMem());
+
----------------
Please consistently brace.
================
Comment at: lib/Transforms/Coroutines/CoroSplit.cpp:425-426
@@ +424,4 @@
+
+ // See if the callsite is for resumption or destruction of the coroutine.
+ Callee = Callee->stripPointerCasts();
+ auto *SubFn = dyn_cast<CoroSubFnInst>(Callee);
----------------
I think we should strip pointer casts before `isa<Function>`.
https://reviews.llvm.org/D24408
More information about the llvm-commits
mailing list