[kaffe] Why does Kaffe's register allocator spill slots in theboundary of basic blocks?
bytecode at tom.com
Wed Nov 3 09:44:37 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.
Now that the elements of the stack are in the registers, we can use the
registers for latter operations directly. There is no need to spii them.
In the entry of each basic block the function startBlock() will invalidate
the relation between all slots and registers. I cannot understand it .
Bytecode (Paul Yuan)
More information about the kaffe