Re: [PATCH] Run DCE after if conversion

2015-03-20 Thread Richard Biener
On Fri, Mar 20, 2015 at 9:50 AM, Andreas Krebbel wrote: > On 03/18/2015 12:04 PM, Richard Biener wrote: >> On Tue, Mar 17, 2015 at 7:29 PM, Jeff Law wrote: >>> On 03/17/2015 02:17 AM, Andreas Krebbel wrote: Just to have some numbers I did run a -j1 GCC bootstrap twice with and

Re: [PATCH] Run DCE after if conversion

2015-03-20 Thread Andreas Krebbel
On 03/18/2015 12:04 PM, Richard Biener wrote: > On Tue, Mar 17, 2015 at 7:29 PM, Jeff Law wrote: >> On 03/17/2015 02:17 AM, Andreas Krebbel wrote: >>> >>> >>> Just to have some numbers I did run a -j1 GCC bootstrap twice with and >>> without the patch on x86_64. >>> Best results for both are: >>>

Re: [PATCH] Run DCE after if conversion

2015-03-18 Thread Richard Biener
On Tue, Mar 17, 2015 at 7:29 PM, Jeff Law wrote: > On 03/17/2015 02:17 AM, Andreas Krebbel wrote: >> >> >> Just to have some numbers I did run a -j1 GCC bootstrap twice with and >> without the patch on x86_64. >> Best results for both are: >> >> clean: 21459s >> patched: 21314s >> >> There rathe

Re: [PATCH] Run DCE after if conversion

2015-03-17 Thread Jeff Law
On 03/17/2015 02:17 AM, Andreas Krebbel wrote: Just to have some numbers I did run a -j1 GCC bootstrap twice with and without the patch on x86_64. Best results for both are: clean: 21459s patched: 21314s There rather appears to be a trend towards reduced compile time perhaps due to the red

Re: [PATCH] Run DCE after if conversion

2015-03-17 Thread Andreas Krebbel
On 03/10/2015 11:27 AM, Richard Biener wrote: > On Tue, Mar 10, 2015 at 10:19 AM, Andreas Krebbel > wrote: >> On 03/10/2015 10:12 AM, Steven Bosscher wrote: >>> On Tue, Mar 10, 2015 at 8:57 AM, Andreas Krebbel wrote: * gcc/ifcvt.c (if_convert): >>> >>> ...yes...? >> >> Damn.

Re: [PATCH] Run DCE after if conversion

2015-03-10 Thread Andreas Krebbel
On 03/10/2015 11:27 AM, Richard Biener wrote: > Is this fixing a regression in some way? Not really. The optimization supposed to fold the bswap in that case is not that old: https://gcc.gnu.org/ml/gcc-patches/2013-05/msg01378.html The underlying problem however is probably visible in one wa

Re: [PATCH] Run DCE after if conversion

2015-03-10 Thread Richard Biener
On Tue, Mar 10, 2015 at 10:19 AM, Andreas Krebbel wrote: > On 03/10/2015 10:12 AM, Steven Bosscher wrote: >> On Tue, Mar 10, 2015 at 8:57 AM, Andreas Krebbel wrote: >>> >>> * gcc/ifcvt.c (if_convert): >>> >> >> ...yes...? > > Damn. mklog is still not able to do the complete job for me ;) >

Re: [PATCH] Run DCE after if conversion

2015-03-10 Thread Andreas Krebbel
On 03/10/2015 10:12 AM, Steven Bosscher wrote: > On Tue, Mar 10, 2015 at 8:57 AM, Andreas Krebbel wrote: >> >> * gcc/ifcvt.c (if_convert): >> > > ...yes...? Damn. mklog is still not able to do the complete job for me ;) > Tiny nail, huge hammer. This triggers a full re-scan of all insns

Re: [PATCH] Run DCE after if conversion

2015-03-10 Thread Steven Bosscher
On Tue, Mar 10, 2015 at 8:57 AM, Andreas Krebbel wrote: > > * gcc/ifcvt.c (if_convert): > ...yes...? > diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c > index a3e3e5c..d2040af 100644 > --- a/gcc/ifcvt.c > +++ b/gcc/ifcvt.c > @@ -4626,6 +4626,13 @@ if_convert (bool after_combine) >

[PATCH] Run DCE after if conversion

2015-03-10 Thread Andreas Krebbel
Hi, the combine pass sometimes gets confused by already dead compares which are remains of the if conversion pass. This e.g. happens in gcc.dg/builtin-bswap-7.c. Compiling with -march=z196 the if blocks are modified to make use of load on condition. This duplicates the compare insn but unfortuna