Re: Fw: Scheduling an early complete loop unrolling pass?

2007-02-09 Thread Dorit Nuzman
Ayal Zaks/Haifa/IBM wrote on 07/02/2007 23:17:54: > ... > > >Ah, right... I wonder if we can keep the loop structure in place, even > >after completely unrolling the loop - I mean the 'struct loop' in > >'current_loops' (not the actual CFG), so that the "SLP in loops" would have > >a chance to at

Fw: Scheduling an early complete loop unrolling pass?

2007-02-07 Thread Ayal Zaks
... >Ah, right... I wonder if we can keep the loop structure in place, even >after completely unrolling the loop - I mean the 'struct loop' in >'current_loops' (not the actual CFG), so that the "SLP in loops" would have >a chance to at least consider vectorizing this "loop". Having a "loop" str

Re: Scheduling an early complete loop unrolling pass?

2007-02-06 Thread Zdenek Dvorak
Hello, > Ira Rosen/Haifa/IBM wrote on 06/02/2007 11:49:17: > > > Dorit Nuzman/Haifa/IBM wrote on 05/02/2007 21:13:40: > > > > > Richard Guenther <[EMAIL PROTECTED]> wrote on 05/02/2007 17:59:00: > > > > ... > > > > > > That's going to change once this project goes in: "(3.2) Straight- > > > line

Re: Scheduling an early complete loop unrolling pass?

2007-02-06 Thread Jan Hubicka
> Richard Guenther <[EMAIL PROTECTED]> wrote on 05/02/2007 18:16:05: > > > On Mon, 5 Feb 2007, Jan Hubicka wrote: > ... > > > Did you run some benchmarks? > > > > Not yet - I'm looking at the C++ SPEC 2006 benchmarks at the moment > > and using vectorization there seems to do a lot of collateral d

Re: Scheduling an early complete loop unrolling pass?

2007-02-06 Thread Richard Guenther
On Tue, 6 Feb 2007, Dorit Nuzman wrote: > Ira Rosen/Haifa/IBM wrote on 06/02/2007 11:49:17: > > > Dorit Nuzman/Haifa/IBM wrote on 05/02/2007 21:13:40: > > > > > Richard Guenther <[EMAIL PROTECTED]> wrote on 05/02/2007 17:59:00: > > > > ... > > > > > > That's going to change once this project goes

Re: Scheduling an early complete loop unrolling pass?

2007-02-06 Thread Dorit Nuzman
Ira Rosen/Haifa/IBM wrote on 06/02/2007 11:49:17: > Dorit Nuzman/Haifa/IBM wrote on 05/02/2007 21:13:40: > > > Richard Guenther <[EMAIL PROTECTED]> wrote on 05/02/2007 17:59:00: > > ... > > > > That's going to change once this project goes in: "(3.2) Straight- > > line code vectorization" from htt

Re: Scheduling an early complete loop unrolling pass?

2007-02-06 Thread Ira Rosen
Dorit Nuzman/Haifa/IBM wrote on 05/02/2007 21:13:40: > Richard Guenther <[EMAIL PROTECTED]> wrote on 05/02/2007 17:59:00: > > > On Mon, 5 Feb 2007, Paolo Bonzini wrote: > > > > > > > > > As we also only vectorize innermost loops I believe doing a > > > > complete unrolling pass early will help i

Re: Scheduling an early complete loop unrolling pass?

2007-02-06 Thread Victor Kaplansky
Richard Guenther <[EMAIL PROTECTED]> wrote on 06.02.2007 11:19:15: > On Tue, 6 Feb 2007, Dorit Nuzman wrote: > > After sleeping on it, it actually makes a lot of sense to me to schedule > > complete loop unrolling before vectorization - I think it would either > > simplify loops (sometimes creatin

Re: Scheduling an early complete loop unrolling pass?

2007-02-06 Thread Richard Guenther
On Tue, 6 Feb 2007, Dorit Nuzman wrote: > > Hi Richard, > > > > > ... > > However..., > > > > I have seen cases in which complete unrolling before vectorization > enabled > > constant propagation, which in turn enabled significant simplification of > > the code, thereby, in fact making a previousl

Re: Scheduling an early complete loop unrolling pass?

2007-02-05 Thread Dorit Nuzman
> Hi Richard, > > ... > However..., > > I have seen cases in which complete unrolling before vectorization enabled > constant propagation, which in turn enabled significant simplification of > the code, thereby, in fact making a previously unvectorizable loop (at > least on some targets, due to the

Re: Scheduling an early complete loop unrolling pass?

2007-02-05 Thread Zdenek Dvorak
Hello, > >As we also only vectorize innermost loops I believe doing a > >complete unrolling pass early will help in general (I pushed > >for this some time ago). > > > >Thoughts? > > It might also hurt, though, since we don't have a basic block > vectorizer. IIUC the vectorizer is able to turn

Re: Scheduling an early complete loop unrolling pass?

2007-02-05 Thread Dorit Nuzman
Hi Richard, Richard Guenther <[EMAIL PROTECTED]> wrote on 05/02/2007 17:27:03: ... > > ... > > and we are later not able to do constant propagation to the > second loop which we can do if we first unroll such small loops. > > As we also only vectorize innermost loops by the way, we are working o

Re: Scheduling an early complete loop unrolling pass?

2007-02-05 Thread Dorit Nuzman
Richard Guenther <[EMAIL PROTECTED]> wrote on 05/02/2007 17:59:00: > On Mon, 5 Feb 2007, Paolo Bonzini wrote: > > > > > > As we also only vectorize innermost loops I believe doing a > > > complete unrolling pass early will help in general (I pushed > > > for this some time ago). > > > > > > Though

Re: Scheduling an early complete loop unrolling pass?

2007-02-05 Thread Dorit Nuzman
Richard Guenther <[EMAIL PROTECTED]> wrote on 05/02/2007 18:16:05: > On Mon, 5 Feb 2007, Jan Hubicka wrote: ... > > Did you run some benchmarks? > > Not yet - I'm looking at the C++ SPEC 2006 benchmarks at the moment > and using vectorization there seems to do a lot of collateral damage > (maybe n

Re: Scheduling an early complete loop unrolling pass?

2007-02-05 Thread Richard Guenther
On Mon, 5 Feb 2007, Jan Hubicka wrote: > > > > Hi, > > > > currently with -ftree-vectorize we generate for > > > > for (i=0; i<3; ++i) > > # SFT.4346_507 = VDEF > > # SFT.4347_508 = VDEF > > # SFT.4348_509 = VDEF > > d[i] = 0.0; > > Also Tomas' patch is supposed to catch this sp

Re: Scheduling an early complete loop unrolling pass?

2007-02-05 Thread Jan Hubicka
> > Hi, > > currently with -ftree-vectorize we generate for > > for (i=0; i<3; ++i) > # SFT.4346_507 = VDEF > # SFT.4347_508 = VDEF > # SFT.4348_509 = VDEF > d[i] = 0.0; Also Tomas' patch is supposed to catch this special case and convert it into memset that should be subsequentl

Re: Scheduling an early complete loop unrolling pass?

2007-02-05 Thread Richard Guenther
On Mon, 5 Feb 2007, Paolo Bonzini wrote: > > > As we also only vectorize innermost loops I believe doing a > > complete unrolling pass early will help in general (I pushed > > for this some time ago). > > > > Thoughts? > > It might also hurt, though, since we don't have a basic block vectorizer

Re: Scheduling an early complete loop unrolling pass?

2007-02-05 Thread Paolo Bonzini
As we also only vectorize innermost loops I believe doing a complete unrolling pass early will help in general (I pushed for this some time ago). Thoughts? It might also hurt, though, since we don't have a basic block vectorizer. IIUC the vectorizer is able to turn for (i = 0; i < 4; i+

Scheduling an early complete loop unrolling pass?

2007-02-05 Thread Richard Guenther
Hi, currently with -ftree-vectorize we generate for for (i=0; i<3; ++i) # SFT.4346_507 = VDEF # SFT.4347_508 = VDEF # SFT.4348_509 = VDEF d[i] = 0.0; for (j=0; j:; vect_cst_.4501_723 = { 0.0, 0.0 }; vect_p.4506_724 = (vector double *) &D.76822; vect_p.4502_725 = vect_p.45