[LLVMdev] Dynamically alternating between register allocators

Evan Cheng evan.cheng at apple.com
Wed Sep 5 14:32:42 PDT 2007


Hi Fernando,

To do this you would need to change the register allocation pass on  
the fly. I don't think this is currently possible. Someone please  
correct me if I am wrong.

I would like to see hierarchical pass capability built into pass  
manager. This allows us to group live variables, phi lowering, two- 
address, lower subreg, live interval analysis, coalescing, allocation,  
and spilling into a single register allocator pass. The register  
allocator pass is then responsible for controlling its own sub-passes  
(not just the order of passes, but also termination conditions).  
Similarly, branch folding and if-conversion should be lumped together  
into a cfg optimization pass. Devang, hint hint. :-)

Evan

On Sep 5, 2007, at 9:36 AM, Fernando Magno Quintao Pereira wrote:

>
> Hey all,
>
>     is there a simple way to alternate between different register
> allocators at run time? I would like to decide dynamically which  
> register
> allocator to use. The decision is based on information that is  
> produced by
> a pass that executes before register allocation takes place.
>
> Is it possible to modify RegisterRegAlloc::Registry to take into
> consideration this information? Is there any similar example in LLVM?
>
> all the best,
>
> Fernando
> _______________________________________________
> 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