[LLVMdev] allocating registers less "sparingly"

Pekka Jääskeläinen pekka.jaaskelainen at tut.fi
Tue Nov 6 10:09:22 PST 2007

On 11/06/2007 07:09 PM, Christopher Lamb wrote:
> I'm only passingly familiar with the register allocator in LLVM, but I'd 
> think that you could tweak it's allocation policy to allocate out of, 
> say, sequential registers and only reuse registers with dead values once 
> it runs out of completely empty ones. Is this what you want?

Exactly. I was hoping there was some generic framework to tweak the
"allocation policy" so it would apply for all register allocators, but
I suppose there is none at the moment.

In addition, for our case, it could help to "flush" all live values to memory
before entering a long-running loop (which does not use the flushed
values) to free more registers for it. This would be useful also for
software pipelining which increases register pressure.

I'll see what I can do. I hopefully get more time to work on this after
the new year.



More information about the llvm-dev mailing list