[llvm-commits] [llvm] r82651 - in /llvm/trunk/lib/Target: Blackfin/BlackfinRegisterInfo.cpp Blackfin/BlackfinRegisterInfo.h TargetRegisterInfo.cpp

Bob Wilson bob.wilson at apple.com
Wed Sep 23 13:57:02 PDT 2009


Author: bwilson
Date: Wed Sep 23 15:57:02 2009
New Revision: 82651

URL: http://llvm.org/viewvc/llvm-project?rev=82651&view=rev
Log:
Remove BlackfinRegisterInfo::getFrameIndexOffset since it is the same as the
default implementation.  Update comment on the default version, which made it
sound like most targets override it.  Currently only X86 and SystemZ override
this method.

Modified:
    llvm/trunk/lib/Target/Blackfin/BlackfinRegisterInfo.cpp
    llvm/trunk/lib/Target/Blackfin/BlackfinRegisterInfo.h
    llvm/trunk/lib/Target/TargetRegisterInfo.cpp

Modified: llvm/trunk/lib/Target/Blackfin/BlackfinRegisterInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Blackfin/BlackfinRegisterInfo.cpp?rev=82651&r1=82650&r2=82651&view=diff

==============================================================================
--- llvm/trunk/lib/Target/Blackfin/BlackfinRegisterInfo.cpp (original)
+++ llvm/trunk/lib/Target/Blackfin/BlackfinRegisterInfo.cpp Wed Sep 23 15:57:02 2009
@@ -451,14 +451,6 @@
   return hasFP(MF) ? BF::FP : BF::SP;
 }
 
-int
-BlackfinRegisterInfo::getFrameIndexOffset(MachineFunction &MF, int FI) const {
-  const TargetFrameInfo &TFI = *MF.getTarget().getFrameInfo();
-  MachineFrameInfo *MFI = MF.getFrameInfo();
-  return MFI->getObjectOffset(FI) + MFI->getStackSize() -
-    TFI.getOffsetOfLocalArea() + MFI->getOffsetAdjustment();
-}
-
 unsigned BlackfinRegisterInfo::getEHExceptionRegister() const {
   llvm_unreachable("What is the exception register");
   return 0;

Modified: llvm/trunk/lib/Target/Blackfin/BlackfinRegisterInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Blackfin/BlackfinRegisterInfo.h?rev=82651&r1=82650&r2=82651&view=diff

==============================================================================
--- llvm/trunk/lib/Target/Blackfin/BlackfinRegisterInfo.h (original)
+++ llvm/trunk/lib/Target/Blackfin/BlackfinRegisterInfo.h Wed Sep 23 15:57:02 2009
@@ -76,7 +76,6 @@
     void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
 
     unsigned getFrameRegister(MachineFunction &MF) const;
-    int getFrameIndexOffset(MachineFunction &MF, int FI) const;
     unsigned getRARegister() const;
 
     // Exception handling queries.

Modified: llvm/trunk/lib/Target/TargetRegisterInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetRegisterInfo.cpp?rev=82651&r1=82650&r2=82651&view=diff

==============================================================================
--- llvm/trunk/lib/Target/TargetRegisterInfo.cpp (original)
+++ llvm/trunk/lib/Target/TargetRegisterInfo.cpp Wed Sep 23 15:57:02 2009
@@ -85,7 +85,7 @@
 
 /// getFrameIndexOffset - Returns the displacement from the frame register to
 /// the stack frame of the specified index. This is the default implementation
-/// which is likely incorrect for the target.
+/// which is overridden for some targets.
 int TargetRegisterInfo::getFrameIndexOffset(MachineFunction &MF, int FI) const {
   const TargetFrameInfo &TFI = *MF.getTarget().getFrameInfo();
   MachineFrameInfo *MFI = MF.getFrameInfo();





More information about the llvm-commits mailing list