summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/PiNodeInsertion.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-05-10 15:38:35 +0000
committerChris Lattner <sabre@nondot.org>2002-05-10 15:38:35 +0000
commit0b18c1d64e690b5472c310c1293434e00bb26524 (patch)
tree35b861e74e78c958a184e7f1849cdfcd34f28041 /llvm/lib/Transforms/Scalar/PiNodeInsertion.cpp
parentbad1b4dfcea66f1c52c88cb9f81f3a768bb00f1b (diff)
downloadbcm5719-llvm-0b18c1d64e690b5472c310c1293434e00bb26524.tar.gz
bcm5719-llvm-0b18c1d64e690b5472c310c1293434e00bb26524.zip
Add support for printing out statistics information when -stats is added to
the command line llvm-svn: 2601
Diffstat (limited to 'llvm/lib/Transforms/Scalar/PiNodeInsertion.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/PiNodeInsertion.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/PiNodeInsertion.cpp b/llvm/lib/Transforms/Scalar/PiNodeInsertion.cpp
index d7bc08b1a4b..2e9c32800b6 100644
--- a/llvm/lib/Transforms/Scalar/PiNodeInsertion.cpp
+++ b/llvm/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;
}
OpenPOWER on IntegriCloud