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

Lauro Ramos Venancio lauro.venancio at gmail.com
Thu May 31 17:34:21 CDT 2007


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.

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