[PATCH] D23461: [Coroutines] Part 7: Split coroutine into subfunctions
Gor Nishanov via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 16 10:10:24 PDT 2016
GorNishanov marked 16 inline comments as done.
================
Comment at: lib/Transforms/Coroutines/CoroSplit.cpp:156
@@ +155,3 @@
+ ValueToValueMapTy VMap;
+ // Replace all args with undefs.
+ for (Argument &A : F.getArgumentList())
----------------
majnemer wrote:
> Hmm, do you have a comment somewhere explaining why? Is it expected that there are no meaningful users of the args?
Added a comment: The buildCoroutineFrame algorithm already rewritten access to the args that occurs after suspend points with loads and stores to/from the coroutine frame.
================
Comment at: lib/Transforms/Coroutines/Coroutines.cpp:215-217
@@ +214,5 @@
+ if (CoroSuspends.size() > 1) {
+ if (CoroSuspends.front()->isFinal())
+ report_fatal_error(
+ "Only one suspend point can be marked as final");
+ std::swap(CoroSuspends.front(), CoroSuspends.back());
----------------
majnemer wrote:
> Do we have a noduplicate for this case?
We do now. I added code to CoroEarly to mark them no duplicate
https://reviews.llvm.org/D23461
More information about the llvm-commits
mailing list