> > + gassign *get_res = gimple_build_assign (lhs, done);
> > + gsi_replace (gsi, get_res, true);
> > + *handled_ops_p = true;
> > + }
> > + break;
> > + }
> > + }
> > + return NULL_TREE;
> > +}
> > +
> > +/* Main entry point for lowering coroutine FE builtins. */
> > +
> > +static unsigned int
> > +execute_lower_coro_builtins (void)
> > +{
> > + struct walk_stmt_info wi;
> > + gimple_seq body;
> > +
> > + body = gimple_body (current_function_decl);
> > + memset (&wi, 0, sizeof (wi));
> > + walk_gimple_seq_mod (&body, lower_coro_builtin, NULL, &wi);
> > + gimple_set_body (current_function_decl, body);
>
> it would be nice to elide the function walk for functions not
> containing any CO* stuff (you noted that below for other parts).
> We can spend a bit in struct function noting functions with
> coroutine code inside and set the bit from frontends or from
> the gimplifier for example. Since it's behind the flag_coroutines
> paywall this can be addressed as followup.
Yes, this bit flag is necessary for following optimization passes, I
wonder which bit you would suggest?
Thanks,
bin