aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Target
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-01-31 03:37:28 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-01-31 03:37:28 +0000
commit72bebb9205c1628601b052d25555aabe6e15e6f4 (patch)
tree46aec03f1542a43687367daa215ba8134eb259bf /include/llvm/Target
parent0a75538a68cda3bddbda3980ea0128d9f6e6339d (diff)
MRegisterInfo::getLocation() is a really bad idea. Its function is to calculate the offset from frame pointer to a stack slot and then storing the delta in a MachineLocation object. The name is bad (it implies a getter), and MRegisterInfo doesn't need to know about MachineLocation.
Replace getLocation() with getFrameIndexOffset() which returns the delta from frame pointer to stack slot. Dwarf writer can then use the information for whatever it wants. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46597 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target')
-rw-r--r--include/llvm/Target/MRegisterInfo.h14
1 files changed, 5 insertions, 9 deletions
diff --git a/include/llvm/Target/MRegisterInfo.h b/include/llvm/Target/MRegisterInfo.h
index 671ce0a197..8a90f50c06 100644
--- a/include/llvm/Target/MRegisterInfo.h
+++ b/include/llvm/Target/MRegisterInfo.h
@@ -27,7 +27,6 @@ namespace llvm {
class BitVector;
class MachineFunction;
class MachineInstr;
-class MachineLocation;
class MachineMove;
class RegScavenger;
class SDNode;
@@ -586,18 +585,15 @@ public:
/// getFrameRegister - This method should return the register used as a base
/// for values allocated in the current stack frame.
virtual unsigned getFrameRegister(MachineFunction &MF) const = 0;
-
+
+ /// getFrameIndexOffset - Returns the displacement from the frame register to
+ /// the stack frame of the specified index.
+ virtual int getFrameIndexOffset(MachineFunction &MF, unsigned FI) const;
+
/// getRARegister - This method should return the register where the return
/// address can be found.
virtual unsigned getRARegister() const = 0;
- /// getLocation - This method should return the actual location of a frame
- /// variable given the frame index. The location is returned in ML.
- /// Subclasses should override this method for special handling of frame
- /// variables and call MRegisterInfo::getLocation for the default action.
- virtual void getLocation(MachineFunction &MF, unsigned Index,
- MachineLocation &ML) const;
-
/// getInitialFrameState - Returns a list of machine moves that are assumed
/// on entry to all functions. Note that LabelID is ignored (assumed to be
/// the beginning of the function.)