track local frame size in MFI, not local to the pass, since PEI needs it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111164 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/llvm/CodeGen/MachineFrameInfo.h b/include/llvm/CodeGen/MachineFrameInfo.h
index 7c98b36..c99b5f5 100644
--- a/include/llvm/CodeGen/MachineFrameInfo.h
+++ b/include/llvm/CodeGen/MachineFrameInfo.h
@@ -296,6 +296,9 @@
   /// blob.
   int64_t getLocalFrameBaseOffset() const { return LocalFrameBaseOffset; }
 
+  /// setLocalFrameSize - Set the size of the local object blob.
+  void setLocalFrameSize(int64_t sz) { LocalFrameSize = sz; }
+
   /// getLocalFrameSize - Get the size of the local object blob.
   int64_t getLocalFrameSize() const { return LocalFrameSize; }
 
diff --git a/lib/CodeGen/LocalStackSlotAllocation.cpp b/lib/CodeGen/LocalStackSlotAllocation.cpp
index dabfb46..8cacc17 100644
--- a/lib/CodeGen/LocalStackSlotAllocation.cpp
+++ b/lib/CodeGen/LocalStackSlotAllocation.cpp
@@ -40,8 +40,6 @@
 
 namespace {
   class LocalStackSlotPass: public MachineFunctionPass {
-    int64_t LocalStackSize;
-
     void calculateFrameObjectOffsets(MachineFunction &Fn);
   public:
     static char ID; // Pass identification, replacement for typeid
@@ -68,7 +66,6 @@
 
 bool LocalStackSlotPass::runOnMachineFunction(MachineFunction &MF) {
   calculateFrameObjectOffsets(MF);
-  DEBUG(dbgs() << LocalStackSize << " bytes of local storage pre-allocated\n");
   return true;
 }
 
@@ -165,5 +162,5 @@
   }
 
   // Remember how big this blob of stack space is
-  LocalStackSize = Offset;
+  MFI->setLocalFrameSize(Offset);
 }