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?