Fix bug: test/Regression/Transforms/InstCombine/2002-05-14-TouchDeletedInst.ll
[oota-llvm.git] / lib / Transforms / Scalar / SCCP.cpp
index 2d8f3ee614279e88e1e2fa433397ea27e385240e..05945458cb6df65f7afd7e904614404b14705110 100644 (file)
@@ -15,7 +15,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "llvm/Transforms/Scalar/ConstantProp.h"
+#include "llvm/Transforms/Scalar.h"
 #include "llvm/ConstantHandling.h"
 #include "llvm/Function.h"
 #include "llvm/BasicBlock.h"
 #include "llvm/Pass.h"
 #include "llvm/Support/InstVisitor.h"
 #include "Support/STLExtras.h"
+#include "Support/StatisticReporter.h"
 #include <algorithm>
 #include <set>
 #include <iostream>
 using std::cerr;
 
+static Statistic<> NumInstRemoved("sccp\t\t- Number of instructions removed");
+
 #if 0    // Enable this to get SCCP debug output
 #define DEBUG_SCCP(X) X
 #else
@@ -315,6 +318,7 @@ bool SCCP::runOnFunction(Function *F) {
 
         // Hey, we just changed something!
         MadeChanges = true;
+        ++NumInstRemoved;
       } else {
         ++BI;
       }