aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlkis Evlogimenos <alkis@evlogimenos.com>2004-02-20 20:53:26 +0000
committerAlkis Evlogimenos <alkis@evlogimenos.com>2004-02-20 20:53:26 +0000
commit007726ca6f64ea74c20ddb90093ee8d6801733af (patch)
tree376c00eacb0adfbbc0c905e0e9a8574f2b90fd55
parentdf158c7e3f09c05805e129fc2e8e661ccbc21f54 (diff)
downloadexternal_llvm-007726ca6f64ea74c20ddb90093ee8d6801733af.zip
external_llvm-007726ca6f64ea74c20ddb90093ee8d6801733af.tar.gz
external_llvm-007726ca6f64ea74c20ddb90093ee8d6801733af.tar.bz2
Some more statistics improvements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11676 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/LiveIntervalAnalysis.cpp28
1 files changed, 17 insertions, 11 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp
index 7a0f4d5..f606d26 100644
--- a/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -41,15 +41,21 @@ namespace {
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 @@ bool LiveIntervals::runOnMachineFunction(MachineFunction &fn) {
// 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 @@ void LiveIntervals::joinIntervals()
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 @@ void LiveIntervals::joinIntervals()
r2iB->second = r2iA->second;
r2rMap_.insert(std::make_pair(intB->reg, intA->reg));
intervals_.erase(intB);
- ++numJoined;
}
}
}