[LLVMdev] which Register allocator to use with llc -O0

Jakob Stoklund Olesen stoklund at 2pi.dk
Tue Nov 6 10:38:32 PST 2012


On Nov 6, 2012, at 6:59 AM, Pankaj Gode <godepankaj at yahoo.com> wrote:

> Hi,
>  
> We were using "linearscan" register scan with llc -O0 option. As per the llvm blog, this is replaced with greedy register alloation.
> http://blog.llvm.org/2011/09/greedy-register-allocation-in-llvm-30.html
>  
> But I think, this register allocation (i.e. 'greedy and 'basic') is blocked if used with -O0 option of llc. Only 'fast register allocator' option can be used with -O0.
>  
> I wanted to understand that what will be consequence of forcefully enabling 'greedy allocation' ?

You can use RAGreedy with -O0, but you need to enable the full optimizing register allocation pipeline:

$ llc -O0 -optimize-regalloc

Same thing if you want to use RABasic.

/jakob

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121106/747d3b98/attachment.html>


More information about the llvm-dev mailing list