Initial support for carrying MachineInstrs in SUnits.
[oota-llvm.git] / include / llvm / CodeGen / MachineFrameInfo.h
index e5eed90c45f1ca20d59bf2dae193544f4a509b84..4190bcd9a36c3d26a644056dda21e29c92f69599 100644 (file)
@@ -150,6 +150,9 @@ class MachineFrameInfo {
   /// only valid during and after prolog/epilog code insertion.
   bool HasCalls;
 
+  /// StackProtectorIdx - The frame index for the stack protector.
+  int StackProtectorIdx;
+
   /// MaxCallFrameSize - This contains the size of the largest call frame if the
   /// target uses frame setup/destroy pseudo instructions (as defined in the
   /// TargetFrameInfo class).  This information is important for frame pointer
@@ -180,6 +183,7 @@ public:
     HasVarSizedObjects = false;
     FrameAddressTaken = false;
     HasCalls = false;
+    StackProtectorIdx = -1;
     MaxCallFrameSize = 0;
     MMI = 0;
   }
@@ -195,17 +199,23 @@ public:
   ///
   bool hasVarSizedObjects() const { return HasVarSizedObjects; }
 
+  /// getStackProtectorIndex/setStackProtectorIndex - Return the index for the
+  /// stack protector object.
+  ///
+  int getStackProtectorIndex() const { return StackProtectorIdx; }
+  void setStackProtectorIndex(int I) { StackProtectorIdx = I; }
+
   /// isFrameAddressTaken - This method may be called any time after instruction
   /// selection is complete to determine if there is a call to
   /// @llvm.frameaddress in this function.
   bool isFrameAddressTaken() const { return FrameAddressTaken; }
   void setFrameAddressIsTaken(bool T) { FrameAddressTaken = T; }
 
-  /// getObjectIndexBegin - Return the minimum frame object index...
+  /// getObjectIndexBegin - Return the minimum frame object index.
   ///
   int getObjectIndexBegin() const { return -NumFixedObjects; }
 
-  /// getObjectIndexEnd - Return one past the maximum frame object index...
+  /// getObjectIndexEnd - Return one past the maximum frame object index.
   ///
   int getObjectIndexEnd() const { return (int)Objects.size()-NumFixedObjects; }
 
@@ -216,7 +226,7 @@ public:
   ///
   unsigned getNumObjects() const { return Objects.size(); }
 
-  /// getObjectSize - Return the size of the specified object
+  /// getObjectSize - Return the size of the specified object.
   ///
   int64_t getObjectSize(int ObjectIdx) const {
     assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&