mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-23 16:19:52 +00:00
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:
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user