Move stuff out of the Optimizations directories into the appropriate Transforms
[oota-llvm.git] / include / llvm / Transforms / Scalar / DCE.h
index 86943ebd8555568fb7dc4eee6712e01bb313def6..bc498c34a76316f502c02eb2bd8d186c4e06fbf2 100644 (file)
@@ -11,9 +11,7 @@
 #include "llvm/Pass.h"
 #include "llvm/BasicBlock.h"
 
-namespace opt {
-
-struct DeadCodeElimination : public Pass {
+struct DeadCodeElimination : public MethodPass {
   // External Interface:
   //
   static bool doDCE(Method *M);
@@ -33,23 +31,23 @@ struct DeadCodeElimination : public Pass {
   static bool RemoveUnusedGlobalValues(Module *M);
 
   // Pass Interface...
-  virtual bool doPassInitialization(Module *M) {
+  virtual bool doInitialization(Module *M) {
     return RemoveUnusedGlobalValues(M);
   }
-  virtual bool doPerMethodWork(Method *M) { return doDCE(M); }
-  virtual bool doPassFinalization(Module *M) {
+  virtual bool runOnMethod(Method *M) { return doDCE(M); }
+  virtual bool doFinalization(Module *M) {
     return RemoveUnusedGlobalValues(M);
   }
 };
 
 
 
-struct AgressiveDCE : public Pass {
+struct AgressiveDCE : public MethodPass {
   // DoADCE - Execute the Agressive Dead Code Elimination Algorithm
   //
   static bool doADCE(Method *M);                        // Defined in ADCE.cpp
 
-  virtual bool doPerMethodWork(Method *M) {
+  virtual bool runOnMethod(Method *M) {
     return doADCE(M);
   }
 };
@@ -66,6 +64,4 @@ struct AgressiveDCE : public Pass {
 //
 bool SimplifyCFG(Method::iterator &BBIt);
 
-}  // End namespace opt
-
 #endif