[llvm] r272700 - [TailDuplication] Split up NumInstrDups statistic.
Geoff Berry via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 14 12:40:10 PDT 2016
Author: gberry
Date: Tue Jun 14 14:40:10 2016
New Revision: 272700
URL: http://llvm.org/viewvc/llvm-project?rev=272700&view=rev
Log:
[TailDuplication] Split up NumInstrDups statistic.
Summary:
Split NumInstrDups statistic into separate added/removed counts to avoid
negative stat being printed as unsigned.
Subscribers: mcrosier, llvm-commits
Differential Revision: http://reviews.llvm.org/D21335
Modified:
llvm/trunk/lib/CodeGen/TailDuplicator.cpp
Modified: llvm/trunk/lib/CodeGen/TailDuplicator.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TailDuplicator.cpp?rev=272700&r1=272699&r2=272700&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/TailDuplicator.cpp (original)
+++ llvm/trunk/lib/CodeGen/TailDuplicator.cpp Tue Jun 14 14:40:10 2016
@@ -33,7 +33,10 @@ using namespace llvm;
STATISTIC(NumTails, "Number of tails duplicated");
STATISTIC(NumTailDups, "Number of tail duplicated blocks");
-STATISTIC(NumInstrDups, "Additional instructions due to tail duplication");
+STATISTIC(NumTailDupAdded,
+ "Number of instructions added due to tail duplication");
+STATISTIC(NumTailDupRemoved,
+ "Number of instructions removed due to tail duplication");
STATISTIC(NumDeadBlocks, "Number of dead blocks removed");
STATISTIC(NumAddedPHIs, "Number of phis added");
@@ -145,7 +148,7 @@ bool TailDuplicator::tailDuplicateAndUpd
// If it is dead, remove it.
if (isDead) {
- NumInstrDups -= MBB->size();
+ NumTailDupRemoved += MBB->size();
removeDeadBlock(MBB);
++NumDeadBlocks;
}
@@ -805,7 +808,7 @@ bool TailDuplicator::tailDuplicate(Machi
// Simplify
TII->AnalyzeBranch(*PredBB, PredTBB, PredFBB, PredCond, true);
- NumInstrDups += TailBB->size() - 1; // subtract one for removed branch
+ NumTailDupAdded += TailBB->size() - 1; // subtract one for removed branch
// Update the CFG.
PredBB->removeSuccessor(PredBB->succ_begin());
More information about the llvm-commits
mailing list