Re: [PATCH] Avoid creating useless debug temporaries

2023-04-26 Thread Richard Biener via Gcc-patches
On Wed, Apr 26, 2023 at 11:31 AM Eric Botcazou wrote: > > > probably also helps PR109612 and the other similar PR referenced therein. > > Here's a more aggressive patch in this area, but it regresses guality tests, > for example: > > +FAIL: gcc.dg/guality/ipa-sra-1.c -O2 -DPREVENT_OPTIMIZATION

Re: [PATCH] Avoid creating useless debug temporaries

2023-04-26 Thread Eric Botcazou via Gcc-patches
> probably also helps PR109612 and the other similar PR referenced therein. Here's a more aggressive patch in this area, but it regresses guality tests, for example: +FAIL: gcc.dg/guality/ipa-sra-1.c -O2 -DPREVENT_OPTIMIZATION line 27 k == 3 +FAIL: gcc.dg/guality/ipa-sra-1.c -O3 -g -DPRE

Re: [PATCH] Avoid creating useless debug temporaries

2023-04-25 Thread Jakub Jelinek via Gcc-patches
On Tue, Apr 25, 2023 at 05:35:36PM +0200, Eric Botcazou wrote: > > Haven't looked into detail, but just saving compilation time shouldn't be > > the only factor when deciding about debug info stuff, another and perhaps > > even more important would be whether it affects the emitted debug info. > >

Re: [PATCH] Avoid creating useless debug temporaries

2023-04-25 Thread Eric Botcazou via Gcc-patches
> Haven't looked into detail, but just saving compilation time shouldn't be > the only factor when deciding about debug info stuff, another and perhaps > even more important would be whether it affects the emitted debug info. At least it doesn't change the guality results. -- Eric Botcazou

Re: [PATCH] Avoid creating useless debug temporaries

2023-04-25 Thread Jakub Jelinek via Gcc-patches
On Tue, Apr 25, 2023 at 05:10:50PM +0200, Richard Biener via Gcc-patches wrote: > On Tue, Apr 25, 2023 at 11:34 AM Eric Botcazou via Gcc-patches > wrote: > > > > Hi, > > > > insert_debug_temp_for_var_def has some strange code whereby it creates debug > > temporaries for SINGLE_RHS (RHS for gimple_

Re: [PATCH] Avoid creating useless debug temporaries

2023-04-25 Thread Richard Biener via Gcc-patches
On Tue, Apr 25, 2023 at 11:34 AM Eric Botcazou via Gcc-patches wrote: > > Hi, > > insert_debug_temp_for_var_def has some strange code whereby it creates debug > temporaries for SINGLE_RHS (RHS for gimple_assign_single_p) but not for other > RHS in the same situation. It indeed looks odd (likewise

[PATCH] Avoid creating useless debug temporaries

2023-04-25 Thread Eric Botcazou via Gcc-patches
Hi, insert_debug_temp_for_var_def has some strange code whereby it creates debug temporaries for SINGLE_RHS (RHS for gimple_assign_single_p) but not for other RHS in the same situation. Removing it saves 25% of compilation time at -g -O for a pathological testcase I have. Bootstrapped/regtest