Change over to use new style pass mechanism, now passes only expose small

creation functions in their public header file, unless they can help it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1816 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2002-02-26 21:46:54 +00:00
parent 3b2541424f
commit bd0ef77cde
32 changed files with 528 additions and 512 deletions

View File

@ -25,6 +25,7 @@
#include "llvm/iMemory.h"
#include "llvm/iTerminators.h"
#include "llvm/iOther.h"
#include "llvm/Pass.h"
#include "llvm/Assembly/Writer.h"
#include "Support/STLExtras.h"
#include <algorithm>
@ -503,11 +504,18 @@ void SCCP::OperandChangedState(User *U) {
UpdateInstruction(I);
}
// DoSparseConditionalConstantProp - Use Sparse Conditional Constant Propogation
// to prove whether a value is constant and whether blocks are used.
//
bool SCCPPass::doSCCP(Method *M) {
SCCP S(M);
return S.doSCCP();
namespace {
// SCCPPass - Use Sparse Conditional Constant Propogation
// to prove whether a value is constant and whether blocks are used.
//
struct SCCPPass : public MethodPass {
inline bool runOnMethod(Method *M) {
SCCP S(M);
return S.doSCCP();
}
};
}
Pass *createSCCPPass() {
return new SCCPPass();
}