[LLVMdev] Supporting pre-allocated registers in LLVM

nkavv at physics.auth.gr nkavv at physics.auth.gr
Thu Oct 4 22:40:10 PDT 2007


Hi there

i would like to ask a few questions to the developers responsible for the
register  allocator(s) design in LLVM (Fernando and other people).

First of all, congrats on providing more than one option for register
allocation.

Now to the questions:

1. I can see the standard algorithms (bigblock, linearscan -- good choice for
the JIT and for general use as well, and the other algorithms). Is it possible
to pre-allocate registers in your linearscan (or in another allocation engine)
for specific source-level or (better) intermediate code (bitcode) level
variables?

Ideally i would to pre-allocate hard registers for specific temporary variables
(and their aliases through out the entire lifetime in a program -- or at least
a single C function). The pre-allocation would take place early in the register
allocation.

I'm designing small-scale embedded systems and pre-allocation is very meaningful
in this context.

2. Which are the new register allocation algorithms currently under design? Do
they support preallocation of registers (it is different to "fixing" a register
in GCC parlance)?

3. Does LLVM work on PDGs (Program Dependence Graphs) as well? If yes, does the
register allocation take on PDGs?


Kind regards
Nikolaos Kavvadias




More information about the llvm-dev mailing list