Scheduling complete loop unrolling early and unconditional?

Zdenek Dvorak rakdver@atrey.karlin.mff.cuni.cz
Thu Dec 16 23:07:00 GMT 2004


Hello,

> > > Therefore, is it possible to schedule either complete unrolling
> > > of loops very early (before sra), or to schedule another sra
> > > run after loop optimizations (that's what I'll try at the moment,
> > > but possibly mess everything up)?
> > >
> > Scheduling SRA after loop optimizations sounds better.  SRA should be
> > able to run more than once.
> 
> Will another loop pass with just
> 
>   p = &pass_loop2.sub;
>   NEXT_PASS (pass_loop_init);
>   NEXT_PASS (pass_complete_unroll);
>   NEXT_PASS (pass_loop_done);
>   *p = NULL;
> 
> not work?  Will it need a pass_iv_canon before pass_complete_unroll?
> I'd schedule pass_loop2 after the first run of dce.  That should be
> cheaper than running sra twice perhaps.

this should work.  However initialization of loop structures is
relatively expensive, so I am not sure how the compile time compares
with running another sra pass.

Zdenek



More information about the Gcc mailing list