[LLVMdev] Spills and values present in both registers & stack

Lang Hames lhames at gmail.com
Sat Jul 30 19:16:16 PDT 2011

Hi Taral,

> You'll note that rbx,r12,r13,r14,r15,rbp are all dead after the
> pushes. But the spill code still insists on using rax to load the
> spilled values, forcing them to be reloaded later. Is the register
> allocator (pbqp, I think) capable of having values in registers and on
> the stack at the same time?

There are a couple of problems here:
(1) PBQP doesn't split live intervals, so those array elements get
spilled everywhere, even in places where there are free registers.
(2) The PBQP allocator always introduces a stack slot for spilled
values, even when they're already on the stack.

I definitely want to tackle these issues, but they'll have to wait for
a month or so while I write up my thesis.


More information about the llvm-dev mailing list