summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorGeoff Berry <gberry@codeaurora.org>2016-06-14 19:40:10 +0000
committerGeoff Berry <gberry@codeaurora.org>2016-06-14 19:40:10 +0000
commitf8c29d6cabf23fbb66416c0649a3cb734167a1b1 (patch)
tree052dd7fa55fb56dc573f1047c7cb14df72705d8b /llvm/lib/CodeGen
parent0c58eb711c0fefc6ac636481348a574070e40a79 (diff)
downloadbcm5719-llvm-f8c29d6cabf23fbb66416c0649a3cb734167a1b1.tar.gz
bcm5719-llvm-f8c29d6cabf23fbb66416c0649a3cb734167a1b1.zip
[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 llvm-svn: 272700
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/TailDuplicator.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/TailDuplicator.cpp b/llvm/lib/CodeGen/TailDuplicator.cpp
index bc17ba77c73..e7628c760b5 100644
--- a/llvm/lib/CodeGen/TailDuplicator.cpp
+++ b/llvm/lib/CodeGen/TailDuplicator.cpp
@@ -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::tailDuplicateAndUpdate(MachineFunction &MF, bool IsSimple,
// If it is dead, remove it.
if (isDead) {
- NumInstrDups -= MBB->size();
+ NumTailDupRemoved += MBB->size();
removeDeadBlock(MBB);
++NumDeadBlocks;
}
@@ -805,7 +808,7 @@ bool TailDuplicator::tailDuplicate(MachineFunction &MF, bool IsSimple,
// 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());
OpenPOWER on IntegriCloud