diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp index 7a0f4d5e640..f606d260d6b 100644 --- a/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -41,15 +41,21 @@ namespace { RegisterAnalysis 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 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(); @@ -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; } } }