[Bug rtl-optimization/20969] unrolling does not take target register pressure into account.
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Tue Apr 12 17:24:00 GMT 2005
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-04-12 17:24 -------
(In reply to comment #8)
> (In reply to comment #6)
> > > Do you have a set of patches to try out?
> >
> > No but if we go your route, then every place where we do an
> > optimization, we
> > will then need to teach it about register pressure which is wrong. Only
> > the register allocator should know.
>
> But if we go down that route, the register allocator has to know about every
> other optimization. Throttling register pressure is usually much simpler
> than un-doing a complex optimization, and then re-doing it with different
> parameters, or doing some other optimizations instead.
> Note that this is particularily true when considering the unrolling of an
> inner loop vs. target register pressure. The target register pressure is
> easy to calculate, and although 4.1 lacks infrastructure for assessment of
> the unroll benefit (which 3.4 has), it is certainly easier to add it there
> in the unroller than in the register allocator.
No it does not, it only needs to know about reroller, resplitter and moving things back into loops,
nothing more.
Also note both XLC and ICC take the route of a reroller, and they both do better than us at register
allocatation. In fact XLC compiles for a lot of targets, not just PPC, so don't use the excuse of these
compilers only compile for one target.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20969
More information about the Gcc-bugs
mailing list