Add some bits that can be set on instructions. Renumber existing bits so
[oota-llvm.git] / include / llvm / Target / TargetFrameInfo.h
index a85cd872406801be154e1e75d9ef45d0bb4e2608..bbaeafdcdfcbe8ccb3486e34950bfc10ade3848a 100644 (file)
@@ -14,6 +14,8 @@
 #ifndef LLVM_TARGET_TARGETFRAMEINFO_H
 #define LLVM_TARGET_TARGETFRAMEINFO_H
 
+#include <utility>
+
 namespace llvm {
 
 class MachineFunction;
@@ -25,7 +27,8 @@ class MachineFunction;
 /// The offset to the local area is the offset from the stack pointer on
 /// function entry to the first location where function data (local variables,
 /// spill locations) can be stored.
-struct TargetFrameInfo {
+class TargetFrameInfo {
+public:
   enum StackDirection {
     StackGrowsUp,        // Adding to the stack increases the stack address
     StackGrowsDown       // Adding to the stack decreases the stack address
@@ -56,6 +59,21 @@ public:
   ///
   int getOffsetOfLocalArea() const { return LocalAreaOffset; }
 
+  /// getCalleeSaveSpillSlots - This method returns a pointer to an array of
+  /// pairs, that contains an entry for each callee save register that must be
+  /// spilled to a particular stack location if it is spilled.
+  ///
+  /// Each entry in this array contains a <register,offset> pair, indicating the
+  /// fixed offset from the incoming stack pointer that each register should be
+  /// spilled at.  If a register is not listed here, the code generator is
+  /// allowed to spill it anywhere it chooses.
+  /// 
+  virtual const std::pair<unsigned, int> *
+  getCalleeSaveSpillSlots(unsigned &NumEntries) const {
+    NumEntries = 0;
+    return 0;
+  }
+  
   //===--------------------------------------------------------------------===//
   // These methods provide details of the stack frame used by Sparc, thus they
   // are Sparc specific.