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
On Friday 09 May 2008 14:49, Evan Cheng wrote:> > 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'sDo you mean "remat" instead of "spill" here? If so, I think I know what the problem is.> I am not sure how you run into this problem. Can you give an example > using pseudo code so I can understand?The problem is on our end. We added FsMOVLDP and mistakenly marked it as rematable. -Dave
On May 9, 2008, at 1:15 PM, David Greene wrote:> On Friday 09 May 2008 14:49, Evan Cheng wrote: > >>> 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 > > Do you mean "remat" instead of "spill" here? If so, I think I know > what > the problem is.Yep remat.> > >> I am not sure how you run into this problem. Can you give an example >> using pseudo code so I can understand? > > The problem is on our end. We added FsMOVLDP and mistakenly marked > it as rematable.That would do it. Evan> > > -Dave > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev