[llvm-commits] CVS: llvm/lib/CodeGen/LiveIntervals.cpp

Alkis Evlogimenos alkis at niobe.cs.uiuc.edu
Fri Feb 20 14:55:03 PST 2004


Changes in directory llvm/lib/CodeGen:

LiveIntervals.cpp updated: 1.57 -> 1.58

---
Log message:

Some more statistics improvements.


---
Diffs of the changes:  (+17 -11)

Index: llvm/lib/CodeGen/LiveIntervals.cpp
diff -u llvm/lib/CodeGen/LiveIntervals.cpp:1.57 llvm/lib/CodeGen/LiveIntervals.cpp:1.58
--- llvm/lib/CodeGen/LiveIntervals.cpp:1.57	Fri Feb 20 14:46:49 2004
+++ llvm/lib/CodeGen/LiveIntervals.cpp	Fri Feb 20 14:53:26 2004
@@ -41,15 +41,21 @@
     RegisterAnalysis<LiveIntervals> X("liveintervals",
                                       "Live Interval Analysis");
 
-    Statistic<> numIntervals("liveintervals", "Number of original intervals");
-    Statistic<> numJoined   ("liveintervals", "Number of intervals after "
-                             "coalescing");
-    Statistic<> numJoins    ("liveintervals", "Number of interval joins "
-                             "performed");
-    Statistic<> numPeep     ("liveintervals", "Number of identity moves "
-                             "eliminated after coalescing");
-    Statistic<> numFolded   ("liveintervals", "Number of register operands "
-                             "folded");
+    Statistic<> numIntervals
+    ("liveintervals", "Number of original intervals");
+
+    Statistic<> numIntervalsAfter
+    ("liveintervals", "Number of intervals after coalescing");
+
+    Statistic<> numJoins
+    ("liveintervals", "Number of interval joins performed");
+
+    Statistic<> numPeep
+    ("liveintervals", "Number of identity moves eliminated after coalescing");
+
+    Statistic<> numFolded
+    ("liveintervals", "Number of register operands folded");
+
     cl::opt<bool>
     join("join-liveintervals",
          cl::desc("Join compatible live intervals"),
@@ -112,6 +118,8 @@
     // join intervals if requested
     if (join) joinIntervals();
 
+    numIntervalsAfter += intervals_.size();
+
     // perform a final pass over the instructions and compute spill
     // weights, coalesce virtual registers and remove identity moves
     const LoopInfo& loopInfo = getAnalysis<LoopInfo>();
@@ -483,7 +491,6 @@
                         r2iB->second = r2iA->second;
                         r2rMap_.insert(std::make_pair(intB->reg, intA->reg));
                         intervals_.erase(intB);
-                        ++numJoined;
                     }
                 }
                 else if (MRegisterInfo::isPhysicalRegister(intA->reg) ^
@@ -504,7 +511,6 @@
                         r2iB->second = r2iA->second;
                         r2rMap_.insert(std::make_pair(intB->reg, intA->reg));
                         intervals_.erase(intB);
-                        ++numJoined;
                     }
                 }
             }





More information about the llvm-commits mailing list