[LLVMdev] Immediate instructions / register allocator

Jonas Paulsson jonas.paulsson at ericsson.com
Mon Oct 22 03:38:23 PDT 2012


Hi,

I tried transforming code that loads an immediate into a virtual register, and then uses that virtual register in various ways, into code that uses immediate operands instead.

To my surprise, this made the register allocator produce worse code in many cases. It seems that it is splitting live intervals and spilling more. In some cases the code was better.

I wonder how this could be? Generally, using the immediates directly as constant operands should decrease regpressure, right? How could the RA-algorithm have been mislead by this?

Thanks,

Jonas

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121022/297bbd16/attachment.html>


More information about the llvm-dev mailing list