This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Loop optimiser upgrade (Was RFC: BB duplication code)
- To: Michael Hayes <m dot hayes at elec dot canterbury dot ac dot nz>
- Subject: Re: Loop optimiser upgrade (Was RFC: BB duplication code)
- From: Jan Hubicka <jh at suse dot cz>
- Date: Sat, 22 Sep 2001 19:16:58 +0200
- Cc: Jan Hubicka <jh at suse dot cz>, gcc at gcc dot gnu dot org
- References: <20010822202900.D30704@atrey.karlin.mff.cuni.cz> <20010822121440.H29601@redhat.com> <20010822212756.G30704@atrey.karlin.mff.cuni.cz> <20010822130404.K29601@redhat.com> <20010823154400.A4372@atrey.karlin.mff.cuni.cz> <15257.37306.220097.483860@ongaonga.elec.canterbury.ac.nz>
Hi,
another simple question - what notion of loop we want to base our optimizer
on? The natural loops itself are probably not best choice, as in case of
following loop
for (i=0; i<1000;i++)
if (i&1)
do something;
else
do something else;
will result in two natural loop each iterating exactly once. Do you have
some plans about that? We can merge the loops based on profile data,
probably - the compaq compiler unsplits each such shared header to common
and uncommon one causing two nested loops.
Will we work on multiple loops, or split the header to get common latch
and thus one natural loop from both?
Whats about the notion of superblock loops - the impact compiler is doing some
optimizations only on these and thus they are easier to implement. With my
tracer code, hot paths of most of internal loops should convert to superblocks,
but still this can be somewhat limited, as too much can fall outside the loop
notion...
Just ideas...
Honza