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