Remove BlackfinRegisterInfo::getFrameIndexOffset since it is the same as the
authorBob Wilson <bob.wilson@apple.com>
Wed, 23 Sep 2009 20:57:02 +0000 (20:57 +0000)
committerBob Wilson <bob.wilson@apple.com>
Wed, 23 Sep 2009 20:57:02 +0000 (20:57 +0000)
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82651 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Blackfin/BlackfinRegisterInfo.cpp
lib/Target/Blackfin/BlackfinRegisterInfo.h
lib/Target/TargetRegisterInfo.cpp

index e820c3b1ff6ec08fed7251992dd9681f895064c8..bb132c57dddacb7f27f9aea8a68cf5910e6b7ce3 100644 (file)
@@ -451,14 +451,6 @@ unsigned BlackfinRegisterInfo::getFrameRegister(MachineFunction &MF) const {
   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;
index 57aea5d3dc12901f9d962dad4aedf19cedb49b3c..5379ca5c9140dfde3d9c35d4c4d537e76f1e032a 100644 (file)
@@ -76,7 +76,6 @@ namespace llvm {
     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.
index 902ee0c04d8ab04aca2044ab5c6d546e1e255fa5..43123991ea80ffab2c290c1a4af41b1e94c76db4 100644 (file)
@@ -85,7 +85,7 @@ BitVector TargetRegisterInfo::getAllocatableSet(MachineFunction &MF,
 
 /// 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();