Add support for variable argument functions!
[oota-llvm.git] / lib / Transforms / Scalar / ConstantProp.cpp
index 025b8a79b238253d16d5e52a558e92f6c2606d2c..b7dde4a113e66c8f79832742b565c1efaf725c0d 100644 (file)
 #include "llvm/Instruction.h"
 #include "llvm/Pass.h"
 #include "llvm/Support/InstIterator.h"
-#include "Support/StatisticReporter.h"
+#include "Support/Statistic.h"
 #include <set>
 
-static Statistic<> NumInstKilled("constprop - Number of instructions killed");
-
 namespace {
+  Statistic<> NumInstKilled("constprop", "Number of instructions killed");
+
   struct ConstantPropogation : public FunctionPass {
     bool runOnFunction(Function &F);
 
     virtual void getAnalysisUsage(AnalysisUsage &AU) const {
-      AU.preservesCFG();
+      AU.setPreservesCFG();
     }
   };
 
-RegisterPass<ConstantPropogation> X("constprop", "Simple constant propogation");
+  RegisterOpt<ConstantPropogation> X("constprop","Simple constant propogation");
 }
 
 Pass *createConstantPropogationPass() {