Re: [PATCH v8 07/12] Enable musttail tail conversion even when not optimizing

2024-07-08 Thread Andi Kleen
On Mon, Jul 08, 2024 at 05:27:53PM +0200, Richard Biener wrote: > > > > Am 08.07.2024 um 17:22 schrieb Andi Kleen : > > > > On Mon, Jul 08, 2024 at 08:53:27AM +0200, Richard Biener wrote: > >> Ah, I see. So this pass is responsible for both -O0 and > >> -fno-optimized-sibling-calls. > >> But I

Re: [PATCH v8 07/12] Enable musttail tail conversion even when not optimizing

2024-07-08 Thread Richard Biener
> Am 08.07.2024 um 17:22 schrieb Andi Kleen : > > On Mon, Jul 08, 2024 at 08:53:27AM +0200, Richard Biener wrote: >> Ah, I see. So this pass is responsible for both -O0 and >> -fno-optimized-sibling-calls. >> But I'm quite sure the other pass doesn't run with -O0 >> -foptimize-sibling-calls,

Re: [PATCH v8 07/12] Enable musttail tail conversion even when not optimizing

2024-07-08 Thread Andi Kleen
On Mon, Jul 08, 2024 at 08:53:27AM +0200, Richard Biener wrote: > Ah, I see. So this pass is responsible for both -O0 and > -fno-optimized-sibling-calls. > But I'm quite sure the other pass doesn't run with -O0 > -foptimize-sibling-calls, does it? It does run: ./cc1 -O0 -fdump-passes -foptimize-

Re: [PATCH v8 07/12] Enable musttail tail conversion even when not optimizing

2024-07-07 Thread Richard Biener
On Sat, Jul 6, 2024 at 6:07 PM Andi Kleen wrote: > > > > +class pass_musttail : public gimple_opt_pass > > > +{ > > > +public: > > > + pass_musttail (gcc::context *ctxt) > > > +: gimple_opt_pass (pass_data_musttail, ctxt) > > > + {} > > > + > > > + /* opt_pass methods: */ > > > + /* This p

Re: [PATCH v8 07/12] Enable musttail tail conversion even when not optimizing

2024-07-06 Thread Andi Kleen
> > +class pass_musttail : public gimple_opt_pass > > +{ > > +public: > > + pass_musttail (gcc::context *ctxt) > > +: gimple_opt_pass (pass_data_musttail, ctxt) > > + {} > > + > > + /* opt_pass methods: */ > > + /* This pass is only used when not optimizing to make [[musttail]] still > > +

Re: [PATCH v8 07/12] Enable musttail tail conversion even when not optimizing

2024-07-05 Thread Richard Biener
On Sat, Jun 22, 2024 at 8:59 PM Andi Kleen wrote: > > Enable the tailcall optimization for non optimizing builds, > but in this case only checks calls that have the musttail attribute set. > This makes musttail work without optimization. > > This is done with a new late musttail pass that is only

[PATCH v8 07/12] Enable musttail tail conversion even when not optimizing

2024-06-22 Thread Andi Kleen
Enable the tailcall optimization for non optimizing builds, but in this case only checks calls that have the musttail attribute set. This makes musttail work without optimization. This is done with a new late musttail pass that is only active when not optimizing. The new pass relies on tree-cfg to