[kaffe] Why does Kaffe's register allocator spill slots in the boundary of basic blocks?

Helmer Krämer hkraemer at freenet.de
Wed Nov 3 09:33:53 PST 2004


On Thu, 4 Nov 2004 00:16:20 +0800
"Bytecode" <bytecode at tom.com> wrote:

> 
> I'm optimizing the register allocation mechod in kaffe.
> I find that the current register allocator spills "dirty" slots in the exit
> of each basic block by calling function endBlock(). Why?

Kaffe's register allocator (the one in jit3) does only do
global register allocation for a limited number of local
variables. To ensure that subsequent code can access the
elements of the operand stack that are still valid at the
end of a basic block, their slots have to be spilled. Same
thing for local variables that were not assigned a global
register.

Regards,
Helmer




More information about the kaffe mailing list