[LLVMdev] Recalculating live intervals

Chris Lattner sabre at nondot.org
Sun Aug 6 15:26:35 PDT 2006


On Sun, 6 Aug 2006, Anton Vayvod wrote:
> I'm developing a register allocator that works iteratively. It spills some
> virtual registers on each iteration until all the rest have physical ones
> assigned.

Take a look at the linear scan allocator.  It is also iterative: it uses 
the spiller interface to insert spill code, which creates (unspillable) 
intervals for the spill code it inserts.

> How can I spill some live intervals at the end of each iteration with new
> live intervals having correct weights?

The linscan allocator inserts spill code with infinite weight, take a look 
at how it works.

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/



More information about the llvm-dev mailing list