lto
Vladimir N. Makarov
vmakarov@redhat.com
Fri Feb 15 13:32:00 GMT 2008
Jan Hubicka wrote:
>>I have to admit that i had not considered the issue of having the later
>>stages of compilation of one function feed into the early stages of
>>another. The problem with this is that it implies a serial ordering of
>>the compilation and that is not going to yield a usable system for
>>compiling very large programs.
>>
>>
>
>Yes, this is why I wanted to bring this in. I am not expert for whole
>program register allocation, but my understanding is that it can really
>help, especially on machine like x86-64, where saving
>prologues/epilogues are relatively expensive. It seems to me that it
>can't scale to really big programs, but it don't have to if we subdivide
>the programs sanely (ie do equivalent of region based compilation for
>large function). As long as the calls crossing boundaries are not very
>frequent, we should be all happy.
>
>Vladimir, Andrew, I am sure you know a lot more about global RA.
>Is it resonable to expect that RA needs to propagate things just down in
>topological order and can we split the program to resonably sized chunks
>where the RA can be handled locally?
>
>
>
IP RA as currenly implemented in IRA does propagate info only down in
topological order. But a good IP RA (e.g. Minimal cost inter-procedural
regiter allocator http://citeseer.ist.psu.edu/kurlander96minimum.html)
needs to propagate info up and down.
But I am quite skeptical about IP RA. To be sucessfull it needs that
the called function is small and uses few registers. Such functions
should be just inlined. It solves IP RA besides other problems.
Intel/Sun/Pathscale compilers make very aggressive function inlining
during LTO. Therefore the code generated by the compilers with LTO is
much bigger (e.g. LTO in pathscale results in 30% bigger code for x86_64
SPECINT2000 and by the way improves the code by 4% and makes the
compiler 50% slower).
In overall I don't think that IP RA is important thing and worth to be
implemented.
More information about the Gcc
mailing list