https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119376

--- Comment #19 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Andi Kleen from comment #18)
> Yes the multiple passes are a problem. They also do redundant work I believe.
> But it would be easier to just check opt_tailcalls I think instead of adding
> a new variable.

I went with a new flag because opt_tailcalls can be cleared during the pass.

> >Plus, given that tail_calls pass uses a dbg_cnt and isn't done for -O0 or 
> >-Og,
> >having musttail pass depend on just !flag_optimize_sibling_calls isn't 
> >correct.
> 
> So it should be a per function flag? 
> 
> dbg_cnts are hard to handle with globals.

I went with disabling cfun->has_musttail after it is handled and possibly
diagnosed.
Another option would be add a new PROP_* flag for that, but given that nothing
uses
has_musttail after the musttail pass, I think just clearing it is easier.

Anyway, working now on the local vars and warnings for that.

Reply via email to