[LLVMdev] Supporting pre-allocated registers in LLVM
Evan Cheng
evan.cheng at apple.com
Fri Oct 5 01:51:32 PDT 2007
On Oct 4, 2007, at 10:40 PM, nkavv at physics.auth.gr wrote:
> 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?
Yes that's done at instruction selection time. If you specify an
instruction definition must go to a physical register, the selector
and scheduler will take care of it. Same for instructions that require
its operands that must be in fixed registers.
>
>
> 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)?
I know of a number of allocators in development. They are not yet made
available to the public yet. Perhaps their authors can chime in.
>
>
> 3. Does LLVM work on PDGs (Program Dependence Graphs) as well? If
> yes, does the
> register allocation take on PDGs?
No it doesn't.
Evan
>
>
>
> Kind regards
> Nikolaos Kavvadias
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
More information about the llvm-dev
mailing list