aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Scalar/PiNodeInsertion.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/Scalar/PiNodeInsertion.cpp')
-rw-r--r--lib/Transforms/Scalar/PiNodeInsertion.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Transforms/Scalar/PiNodeInsertion.cpp b/lib/Transforms/Scalar/PiNodeInsertion.cpp
index d7bc08b1a4..2e9c32800b 100644
--- a/lib/Transforms/Scalar/PiNodeInsertion.cpp
+++ b/lib/Transforms/Scalar/PiNodeInsertion.cpp
@@ -34,6 +34,9 @@
#include "llvm/iOperators.h"
#include "llvm/iPHINode.h"
#include "llvm/Support/CFG.h"
+#include "Support/StatisticReporter.h"
+
+static Statistic<> NumInserted("pinodes\t\t- Number of Pi nodes inserted");
namespace {
struct PiNodeInserter : public FunctionPass {
@@ -180,6 +183,8 @@ bool PiNodeInserter::insertPiNodeFor(Value *V, BasicBlock *Succ, Value *Rep) {
if (Rep == 0)
cast<PHINode>(Pi)->addIncoming(V, Pred);
+
+ ++NumInserted;
return true;
}