Convert to new simpler pass structure

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@877 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2001-10-18 05:21:56 +00:00
parent edcf6491a8
commit b44523bd9d
6 changed files with 25 additions and 30 deletions

View File

@@ -12,7 +12,7 @@
namespace opt {
struct DeadCodeElimination : public StatelessPass<DeadCodeElimination> {
struct DeadCodeElimination : public Pass {
// External Interface:
//
static bool doDCE(Method *M);
@@ -32,23 +32,23 @@ struct DeadCodeElimination : public StatelessPass<DeadCodeElimination> {
// static bool RemoveUnusedGlobalValuesAfterLink(Module *M); // TODO
// Pass Interface...
inline static bool doPassInitialization(Module *M) {
virtual bool doPassInitialization(Module *M) {
return RemoveUnusedGlobalValues(M);
}
inline static bool doPerMethodWork(Method *M) { return doDCE(M); }
inline static bool doPassFinalization(Module *M) {
virtual bool doPerMethodWork(Method *M) { return doDCE(M); }
virtual bool doPassFinalization(Module *M) {
return RemoveUnusedGlobalValues(M);
}
};
struct AgressiveDCE : public StatelessPass<AgressiveDCE> {
struct AgressiveDCE : public Pass {
// DoADCE - Execute the Agressive Dead Code Elimination Algorithm
//
static bool doADCE(Method *M); // Defined in ADCE.cpp
inline static bool doPerMethodWork(Method *M) {
virtual bool doPerMethodWork(Method *M) {
return doADCE(M);
}
};