================
@@ -973,8 +1063,18 @@ void CodeGenFunction::EmitCoroutineBody(const
CoroutineBodyStmt &S) {
// shouldn't change the AST.
if (PreviousRetValue)
cast<ReturnStmt>(Ret)->setRetValue(PreviousRetValue);
- }
+ if (!GroManager.DirectEmit) {
+ EndCall->moveBefore(RetBB->getTerminator()->getIterator());
+ // Send GRO conversion to ConvBB
+ BasicBlock *ConvBB = GroManager.ConvBB;
+ auto *GroConv = RetBB->splitBasicBlockBefore(EndCall);
+ GroConv->replaceAllUsesWith(RetBB);
+ GroConv->getTerminator()->eraseFromParent();
+ ConvBB->splice(ConvBB->begin(), GroConv);
+ GroConv->eraseFromParent();
+ }
----------------
ChuanqiXu9 wrote:
The dance here seems slightly not straighforward. Is it possible to directly
emit in ConvBB if we need Conv?
https://github.com/llvm/llvm-project/pull/151067
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits