[LLVMdev] Complicated Remat Question

Evan Cheng evan.cheng at apple.com
Fri May 9 12:49:49 PDT 2008


On May 9, 2008, at 12:21 PM, David Greene wrote:

> On Friday 09 May 2008 13:20, David Greene wrote:
>
>> One is that %reg1461 is assigned a register but LocalSpiller still  
>> tries to
>> remat it instead of just using the register it was assigned to.  I  
>> think
>> it's easy enough to fix this problem, but I don't think this gets  
>> at the
>> deeper issue.
>
> Duh.  Of course this isn't a problem.  We have to remat (or load)  
> this because
> it's the result of spilling %reg1235.  I got confused.  :-/
>
> So the real problem is that one of the operands of the remat def was  
> spilled.
> Perhaps if that happens we mark registers using that remat def as not
> rematable?

  We only allow instructions without any register operand and / or a  
single pic base operand to be spilled. The later is a hack. :-) It's  
an ok hack because we know the pic base has a single definition and  
it's widely used throughout the function. So it doesn't really hurt to  
extend its live ranges for remat. We also prevent the def of any  
register operand of a remat'ed instruction from being spilled to  
prevent this problem.

I am not sure how you run into this problem. Can you give an example  
using pseudo code so I can understand?

Evan

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