Update local stack block allocation to let PEI do the allocs if no additional
[oota-llvm.git] / include / llvm / CodeGen / MachineFrameInfo.h
index ba5d6ba97ebf00d8e0163c894113ca992c55e2cd..f8bf14ab018851cffbce025447bf235e60cbc0a0 100644 (file)
@@ -216,6 +216,11 @@ class MachineFrameInfo {
   /// alignment of any object in it.
   unsigned LocalFrameMaxAlign;
 
+  /// Whether the local object blob needs to be allocated together. If not,
+  /// PEI should ignore the isPreAllocated flags on the stack objects and
+  /// just allocate them normally.
+  bool UseLocalStackAllocationBlock;
+
 public:
     explicit MachineFrameInfo(const TargetFrameInfo &tfi) : TFI(tfi) {
     StackSize = NumFixedObjects = OffsetAdjustment = MaxAlignment = 0;
@@ -315,6 +320,17 @@ public:
   /// object blob.
   unsigned getLocalFrameMaxAlign() { return LocalFrameMaxAlign; }
 
+  /// getUseLocalStackAllocationBlock - Get whether the local allocation blob
+  /// should be allocated together or let PEI allocate the locals in it
+  /// directly.
+  bool getUseLocalStackAllocationBlock() {return UseLocalStackAllocationBlock;}
+
+  /// setUseLocalStackAllocationBlock - Set whether the local allocation blob
+  /// should be allocated together or let PEI allocate the locals in it
+  /// directly.
+  void setUseLocalStackAllocationBlock(bool v) {
+    UseLocalStackAllocationBlock = v;
+  }
 
   /// isObjectPreAllocated - Return true if the object was pre-allocated into
   /// the local block.