This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Variable Expansion Optimization


Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz> wrote on 23/08/2004
10:11:36:

> Hello,
>
> > >1) The loop unrolling as a separate optimization should be done on
> > >   rtl level, to avoid unnecessary compile-time overheads (optimizing
> > >   the unrolled loop bodies separately is rarely useful and usually
> > >   just a waste of time).  For reasons mentioned by Sebastian
(possible
> > >   loss of information during unrolling, mostly), I believe the right
> > >   place for the unrolling optimization would be after the loop-aware
> > >   scheduling passes (SMS), and before rest of scheduling passes and
> > >   register allocation.
> >
> > Well, SMS could overlap more insns if the loop is unrolled before SMS.
>
> as I understood, unrolling is a part of SMS; why this should be the
> case?

SMS does not unroll the loop. It "peels" certain insns into a prolog (and
complementary into an epilog), so that the loop itself iterates a few
iterations less.

Ayal.


>
> Zdenek
>
> > OTOH, SMS generates register-moves (in the absence of rotating
registers),
> > which could be eliminated by further unrolling - after or as a final
step
> > of SMS.
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]