[llvm-commits] [llvm] r111164 - in /llvm/trunk: include/llvm/CodeGen/MachineFrameInfo.h lib/CodeGen/LocalStackSlotAllocation.cpp

Jim Grosbach grosbach at apple.com
Mon Aug 16 11:06:15 PDT 2010


Author: grosbach
Date: Mon Aug 16 13:06:15 2010
New Revision: 111164

URL: http://llvm.org/viewvc/llvm-project?rev=111164&view=rev
Log:
track local frame size in MFI, not local to the pass, since PEI needs it.

Modified:
    llvm/trunk/include/llvm/CodeGen/MachineFrameInfo.h
    llvm/trunk/lib/CodeGen/LocalStackSlotAllocation.cpp

Modified: llvm/trunk/include/llvm/CodeGen/MachineFrameInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineFrameInfo.h?rev=111164&r1=111163&r2=111164&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineFrameInfo.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineFrameInfo.h Mon Aug 16 13:06:15 2010
@@ -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; }
 

Modified: llvm/trunk/lib/CodeGen/LocalStackSlotAllocation.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LocalStackSlotAllocation.cpp?rev=111164&r1=111163&r2=111164&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LocalStackSlotAllocation.cpp (original)
+++ llvm/trunk/lib/CodeGen/LocalStackSlotAllocation.cpp Mon Aug 16 13:06:15 2010
@@ -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);
 }





More information about the llvm-commits mailing list