Re: A case that PRE optimization hurts performance

2011-09-27 Thread Jeff Law
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/27/11 09:00, Richard Guenther wrote: >> The thing to remember is jump threading is tasked detecting >> cases where the control statement has a predetermined destination >> utilizing path sensitive information. Expanding it to do >> general path

Re: A case that PRE optimization hurts performance

2011-09-27 Thread Richard Guenther
On Tue, Sep 27, 2011 at 4:56 PM, Jeff Law wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 09/27/11 01:30, Richard Guenther wrote: > >> >>> It knows something about prephitmp.6_1 and thus could simplify >>> D.2734_9 = prephitmp_6.1 & D.2732_7; to D.2734_9 = D.2732_7; But >>> admitte

Re: A case that PRE optimization hurts performance

2011-09-27 Thread Jeff Law
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/27/11 01:30, Richard Guenther wrote: > >> It knows something about prephitmp.6_1 and thus could simplify >> D.2734_9 = prephitmp_6.1 & D.2732_7; to D.2734_9 = D.2732_7; But >> admittedly I have no idea if DOM tries to simplify things other >>

Re: A case that PRE optimization hurts performance

2011-09-27 Thread Richard Guenther
On Mon, Sep 26, 2011 at 6:42 PM, Jeff Law wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 09/26/11 05:00, Richard Guenther wrote: >> On Mon, Sep 26, 2011 at 9:39 AM, Jiangning Liu >> wrote: > * Without PRE, > > Path1: movl    $2, %eax cmpl    $1, %eax je      .L3 >

RE: A case that PRE optimization hurts performance

2011-09-26 Thread Jiangning Liu
> -Original Message- > From: Jeff Law [mailto:l...@redhat.com] > Sent: Tuesday, September 27, 2011 12:43 AM > To: Richard Guenther > Cc: Jiangning Liu; gcc@gcc.gnu.org > Subject: Re: A case that PRE optimization hurts performance > > -BEGIN PGP SIGNED M

Re: A case that PRE optimization hurts performance

2011-09-26 Thread Jeff Law
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/26/11 05:00, Richard Guenther wrote: > On Mon, Sep 26, 2011 at 9:39 AM, Jiangning Liu > wrote: * Without PRE, Path1: movl$2, %eax cmpl$1, %eax je .L3 Path2: movb$3, %al cmpl$1, %eax je .L3 >>>

Re: A case that PRE optimization hurts performance

2011-09-26 Thread Richard Guenther
On Mon, Sep 26, 2011 at 9:39 AM, Jiangning Liu wrote: >> > * Without PRE, >> > >> > Path1: >> >        movl    $2, %eax >> >        cmpl    $1, %eax >> >        je      .L3 >> > >> > Path2: >> >        movb    $3, %al >> >        cmpl    $1, %eax >> >        je      .L3 >> > >> > Path3: >> >      

RE: A case that PRE optimization hurts performance

2011-09-26 Thread Jiangning Liu
> > * Without PRE, > > > > Path1: > >        movl    $2, %eax > >        cmpl    $1, %eax > >        je      .L3 > > > > Path2: > >        movb    $3, %al > >        cmpl    $1, %eax > >        je      .L3 > > > > Path3: > >        cmpl    $1, %eax > >        jne     .L14 > > > > * With PRE, > > >

Re: A case that PRE optimization hurts performance

2011-09-23 Thread Richard Guenther
 $1, %eax >        jne     .L14 > > * With PRE, > > Path1: >        movl    $1, %ebx >        movl    $2, %eax >        testb   %bl, %bl >        je      .L3 > > Path2: >        movl    $1, %ebx >        movb    $3, %al >        testb   %bl, %bl >    

RE: A case that PRE optimization hurts performance

2011-09-15 Thread Jiangning Liu
ts? Thanks, -Jiangning > -Original Message- > From: Richard Guenther [mailto:richard.guent...@gmail.com] > Sent: Tuesday, August 02, 2011 5:23 PM > To: Jiangning Liu > Cc: gcc@gcc.gnu.org > Subject: Re: A case that PRE optimization hurts performance > > On Tue, A

Re: A case that PRE optimization hurts performance

2011-08-15 Thread Václav Zeman
On Tue, 2 Aug 2011 10:37:03 +0800, Jiangning Liu wrote: Hi, For the following simple test case, PRE optimization hoists computation (s!=1) into the default branch of the switch statement, and finally causes very poor code generation. This problem occurs in both X86 and ARM, and I believe it

Re: A case that PRE optimization hurts performance

2011-08-02 Thread Richard Guenther
On Tue, Aug 2, 2011 at 4:37 AM, Jiangning Liu wrote: > Hi, > > For the following simple test case, PRE optimization hoists computation > (s!=1) into the default branch of the switch statement, and finally causes > very poor code generation. This problem occurs in both X86 and ARM, and I > believe