[llvm-commits] CVS: llvm/lib/CodeGen/PrologEpilogInserter.cpp

Evan Cheng evan.cheng at apple.com
Thu May 31 15:45:29 PDT 2007


On May 31, 2007, at 3:34 PM, Lauro Ramos Venancio wrote:

> I'm not disabling the use of RS when FP is used. About 30 lines  
> before my
> change, there is this code:
>
> if (RS && RegInfo->hasFP(Fn)) {
>    int SFI = RS->getScavengingFrameIndex();
>    if (SFI >= 0) {
> ...
>
> The bug was: the PrologEpilogInserter has two chunks of code to  
> define the
> ScavengingFrameIndex offset (one for when fp is used and other for  
> when sp is
> used). The sp chunk of code was overwriting the calculation made by  
> fp chunk of
> code.

Ahhhh... Now that it makes sense. Please add a line of comment so an  
idiot like me can read my own code. :-)

Evan

>
> Lauro
>
>
> 2007/5/31, Evan Cheng <evan.cheng at apple.com>:
>> Hi Lauro,
>>
>> This is the wrong fix.
>>
>> Even if disabling the use of RS when FP is used is correct, that's up
>> to the target to not instantiate RS when it detects that. PEI
>> shouldn't do this check. Please revert this fix. I'm going to reopen
>> the bug because we need a proper fix.
>>
>> Evan
>>
>> On May 31, 2007, at 11:28 AM, Lauro Ramos Venancio wrote:
>>
>> >
>> >
>> > Changes in directory llvm/lib/CodeGen:
>> >
>> > PrologEpilogInserter.cpp updated: 1.87 -> 1.88
>> > ---
>> > Log message:
>> >
>> > Fix PR1424: http://llvm.org/PR1424 .
>> > When a function has FP, the register scavenging spill slot offset
>> > already
>> > was calculated.
>> >
>> >
>> > ---
>> > Diffs of the changes:  (+1 -1)
>> >
>> >  PrologEpilogInserter.cpp |    2 +-
>> >  1 files changed, 1 insertion(+), 1 deletion(-)
>> >
>> >
>> > Index: llvm/lib/CodeGen/PrologEpilogInserter.cpp
>> > diff -u llvm/lib/CodeGen/PrologEpilogInserter.cpp:1.87 llvm/lib/
>> > CodeGen/PrologEpilogInserter.cpp:1.88
>> > --- llvm/lib/CodeGen/PrologEpilogInserter.cpp:1.87    Wed May  2
>> > 20:11:53 2007
>> > +++ llvm/lib/CodeGen/PrologEpilogInserter.cpp Thu May 31  
>> 13:27:58 2007
>> > @@ -428,7 +428,7 @@
>> >
>> >    // Make sure the special register scavenging spill slot is
>> > closest to the
>> >    // stack pointer.
>> > -  if (RS) {
>> > +  if (RS && !RegInfo->hasFP(Fn)) {
>> >      int SFI = RS->getScavengingFrameIndex();
>> >      if (SFI >= 0) {
>> >        // If stack grows down, we need to add size of find the  
>> lowest
>> >
>> >
>> >
>> > _______________________________________________
>> > llvm-commits mailing list
>> > llvm-commits at cs.uiuc.edu
>> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>>




More information about the llvm-commits mailing list