[LLVMdev] Immediate instructions / register allocator

David Blaikie dblaikie at gmail.com
Mon Oct 22 08:33:28 PDT 2012


On Mon, Oct 22, 2012 at 3:38 AM, Jonas Paulsson
<jonas.paulsson at ericsson.com> wrote:
> 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.

I suspect a concrete example might be helpful in demonstrating the
specific issue.

> 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
>
>
>
>
> _______________________________________________
> 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