[llvm-commits] [llvm] r63091 - /llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp

Owen Anderson resistor at mac.com
Mon Jan 26 21:01:17 PST 2009


Author: resistor
Date: Mon Jan 26 23:01:15 2009
New Revision: 63091

URL: http://llvm.org/viewvc/llvm-project?rev=63091&view=rev
Log:
Make the pre-split-limit option more useful by using a per-function counter.

Modified:
    llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp

Modified: llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp?rev=63091&r1=63090&r2=63091&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp (original)
+++ llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp Mon Jan 26 23:01:15 2009
@@ -38,7 +38,7 @@
 
 static cl::opt<int> PreSplitLimit("pre-split-limit", cl::init(-1), cl::Hidden);
 
-STATISTIC(NumSplits, "Number of intervals split");
+STATISTIC(NumTotalSplits, "Number of intervals split");
 STATISTIC(NumRemats, "Number of intervals split by rematerialization");
 STATISTIC(NumFolds, "Number of intervals split with spill folding");
 STATISTIC(NumRenumbers, "Number of intervals renumbered into new registers");
@@ -77,6 +77,8 @@
 
     // Def2SpillMap - A map from a def instruction index to spill index.
     DenseMap<unsigned, unsigned> Def2SpillMap;
+    
+    unsigned NumSplits;
 
   public:
     static char ID;
@@ -1191,6 +1193,7 @@
   LSs    = &getAnalysis<LiveStacks>();
 
   bool MadeChange = false;
+  NumSplits = 0;
 
   // Make sure blocks are numbered in order.
   MF.RenumberBlocks();
@@ -1217,6 +1220,9 @@
   }
 
   MadeChange |= removeDeadSpills(Split);
+  
+  if (NumSplits)
+    NumTotalSplits += NumSplits;
 
   return MadeChange;
 }





More information about the llvm-commits mailing list