Loop optimiser upgrade (Was RFC: BB duplication code)
Jan Hubicka
jh@suse.cz
Sat Sep 22 10:17:00 GMT 2001
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
More information about the Gcc
mailing list