aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Transforms/Scalar/ValuePropagation.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Transforms/Scalar/ValuePropagation.cpp b/lib/Transforms/Scalar/ValuePropagation.cpp
index ae58eafcee..7e4fb8b3ce 100644
--- a/lib/Transforms/Scalar/ValuePropagation.cpp
+++ b/lib/Transforms/Scalar/ValuePropagation.cpp
@@ -18,8 +18,12 @@
#include "llvm/Pass.h"
#include "llvm/Analysis/LazyValueInfo.h"
#include "llvm/Transforms/Utils/Local.h"
+#include "llvm/ADT/Statistic.h"
using namespace llvm;
+STATISTIC(NumPhis, "Number of phis propagated");
+STATISTIC(NumSelects, "Number of selects propagated");
+
namespace {
class ValuePropagation : public FunctionPass {
LazyValueInfo *LVI;
@@ -65,6 +69,8 @@ bool ValuePropagation::processSelect(SelectInst *S) {
assert(0 && "Select on constant is neither 0 nor 1?");
}
+ ++NumSelects;
+
return true;
}
@@ -88,6 +94,8 @@ bool ValuePropagation::processPHI(PHINode *P) {
changed = true;
}
+ ++NumPhis;
+
return changed;
}