[LLVMdev] Some questions about live intervals

Fernando Magno Quintao Pereira fernando at CS.UCLA.EDU
Fri Feb 1 00:19:12 PST 2008


> Actually, Sarkar's algorithm can split only at block boundaries, as far
> as I understand. This can be an obstacle for very long basic blocks.
> One of the interesting ideas could be to introduce live-range splitting
> into his algorithm.

As far as I understand it, it can also split in the interior of basic 
blocks, because of pre-colored registers, otherwise it would  not be 
optimal.

> I've seen references to it on your page. But this debugger is in Java,
> or? So, one has to dump the results of register allocation and input
> problem and it would do some checks, or?

It is implemented in Java. You must dump some output and run the debugger 
on this output.

> Actually, I already implemented something very similar for Wimmer's
> linear scan. The main issue was to order the copies in the right way
> and to introduce stores/loads to handle circular dependencies. Or do
> you say that register classes of different sizes introduce additional
> problems?

Well, it makes it a little bit more complicated, but only a little bit. A 
problem that I had was when the lower and higher bits of registers were 
swapped. For instance, when implementing the parallel copy:

BH <= AL || AX <= BX

you will need two swaps (or three copies), instead of only one swap if 
there were no aliasing.

best,

Fernando



More information about the llvm-dev mailing list