[Symbolize] Improve the ownership of parsed objects.
[oota-llvm.git] / include / llvm / CodeGen / MachineFrameInfo.h
index 43d2feb4e48a7ebf68d524a742f3dac8cfe898dc..f5a688458d2e65621aa7b36b34101d70d6ede0bc 100644 (file)
@@ -125,6 +125,16 @@ class MachineFrameInfo {
   unsigned StackAlignment;
 
   /// Can the stack be realigned.
+  /// Targets that set this to false don't have the ability to overalign
+  /// their stack frame, and thus, overaligned allocas are all treated
+  /// as dynamic allocations and the target must handle them as part
+  /// of DYNAMIC_STACKALLOC lowering.
+  /// FIXME: There is room for improvement in this case, in terms of
+  /// grouping overaligned allocas into a "secondary stack frame" and
+  /// then only use a single alloca to allocate this frame and only a
+  /// single virtual register to access it. Currently, without such an
+  /// optimization, each such alloca gets it's own dynamic
+  /// realignment.
   bool StackRealignable;
 
   /// The list of stack objects allocated.
@@ -198,7 +208,7 @@ class MachineFrameInfo {
   /// 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 elimination.
-  /// If is only valid during and after prolog/epilog code insertion.
+  /// It is only valid during and after prolog/epilog code insertion.
   unsigned MaxCallFrameSize;
 
   /// The prolog/epilog code inserter fills in this vector with each
@@ -288,6 +298,7 @@ public:
   /// Return the index for the stack protector object.
   int getStackProtectorIndex() const { return StackProtectorIdx; }
   void setStackProtectorIndex(int I) { StackProtectorIdx = I; }
+  bool hasStackProtectorIndex() const { return StackProtectorIdx != -1; }
 
   /// Return the index for the function context object.
   /// This object is used for SjLj exceptions.