which Register allocator to use with llc -O0

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’ ?

Regards,
Pankaj

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