[PATCH] D98638: [RFC][Coroutine] Force stack allocation after await_suspend() call
Xun Li via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 16 17:50:19 PDT 2021
lxfind added inline comments.
================
Comment at: clang/include/clang/AST/ExprCXX.h:4695
+/// afterwards on the stack.
class CoroutineSuspendExpr : public Expr {
friend class ASTStmtReader;
----------------
lxfind wrote:
> ChuanqiXu wrote:
> > It looks strange for the change of `CoroutineSuspendExpr` at the first glance. It is easy to understand the coroutine suspend expression is consists of three parts: Ready, Suspend and resume. It is written in the language documentation. And the new added AwaitSuspendCall is confusing.
> I agree. But this seems to be the only way to break up Suspend at the point of await_suspend call so that we can insert instructions during CodeGen. Open to ideas though.
One potential way to make this more clear is to rename these two nodes as: Suspend and Transfer.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98638/new/
https://reviews.llvm.org/D98638
More information about the cfe-commits
mailing list