[llvm-commits] CVS: llvm/include/llvm/Target/MRegisterInfo.h

Jim Laskey jlaskey at apple.com
Fri Apr 7 09:35:05 PDT 2006



Changes in directory llvm/include/llvm/Target:

MRegisterInfo.h updated: 1.73 -> 1.74
---
Log message:

Foundation for call frame information.


---
Diffs of the changes:  (+20 -2)

 MRegisterInfo.h |   22 ++++++++++++++++++++--
 1 files changed, 20 insertions(+), 2 deletions(-)


Index: llvm/include/llvm/Target/MRegisterInfo.h
diff -u llvm/include/llvm/Target/MRegisterInfo.h:1.73 llvm/include/llvm/Target/MRegisterInfo.h:1.74
--- llvm/include/llvm/Target/MRegisterInfo.h:1.73	Tue Mar 28 07:48:33 2006
+++ llvm/include/llvm/Target/MRegisterInfo.h	Fri Apr  7 11:34:45 2006
@@ -27,6 +27,7 @@
 class MachineFunction;
 class MachineInstr;
 class MachineLocation;
+class MachineMove;
 class TargetRegisterClass;
 
 /// TargetRegisterDesc - This record contains all of the information known about
@@ -345,18 +346,35 @@
                             
   //===--------------------------------------------------------------------===//
   /// Debug information queries.
+  
+  /// getDwarfRegNum - Map a target register to an equivalent dwarf register
+  /// number.  Returns -1 if there is no equivalent value.
+  virtual int getDwarfRegNum(unsigned RegNum) const = 0;
 
   /// getFrameRegister - This method should return the register used as a base
-  /// for values allocated in the current stack frame.  This value should be
-  /// returned as a dwarf register number (getDwarfRegNum.)
+  /// for values allocated in the current stack frame.
   virtual unsigned getFrameRegister(MachineFunction &MF) const = 0;
+  
+  /// getRARegister - This method should return the register where the return
+  /// address can be found.
+  virtual unsigned getRARegister() const = 0;
                             
+  /// getStackDirection - This method should return the factor by which stacks
+  /// grow.  The tyical value is -4 which is the grows negatively in 4 byte
+  /// increments.
+  virtual int getStackDirection() const;
+  
   /// 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.)
+  virtual void getInitialFrameState(std::vector<MachineMove *> &Moves) const;
 };
 
 // This is useful when building DenseMaps keyed on virtual registers






More information about the llvm-commits mailing list