mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-04 21:30:49 +00:00
Minor cleanups. There is no reason for SCCP to derive from instvisitor anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17825 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b77d5d8d50
commit
14051812ff
@ -794,23 +794,21 @@ void SCCPSolver::Solve() {
|
||||
|
||||
|
||||
namespace {
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
/// SCCP Class - This class does all of the work of Sparse Conditional Constant
|
||||
/// Propagation.
|
||||
///
|
||||
class SCCP : public FunctionPass, public InstVisitor<SCCP> {
|
||||
public:
|
||||
|
||||
// runOnFunction - Run the Sparse Conditional Constant Propagation algorithm,
|
||||
// and return true if the function was modified.
|
||||
//===--------------------------------------------------------------------===//
|
||||
//
|
||||
bool runOnFunction(Function &F);
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.setPreservesCFG();
|
||||
}
|
||||
};
|
||||
/// SCCP Class - This class uses the SCCPSolver to implement a per-function
|
||||
/// Sparse Conditional COnstant Propagator.
|
||||
///
|
||||
struct SCCP : public FunctionPass {
|
||||
// runOnFunction - Run the Sparse Conditional Constant Propagation
|
||||
// algorithm, and return true if the function was modified.
|
||||
//
|
||||
bool runOnFunction(Function &F);
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.setPreservesCFG();
|
||||
}
|
||||
};
|
||||
|
||||
RegisterOpt<SCCP> X("sccp", "Sparse Conditional Constant Propagation");
|
||||
} // end anonymous namespace
|
||||
@ -822,10 +820,6 @@ FunctionPass *llvm::createSCCPPass() {
|
||||
}
|
||||
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// SCCP Class Implementation
|
||||
|
||||
|
||||
// runOnFunction() - Run the Sparse Conditional Constant Propagation algorithm,
|
||||
// and return true if the function was modified.
|
||||
//
|
||||
@ -907,4 +901,3 @@ bool SCCP::runOnFunction(Function &F) {
|
||||
return MadeChanges;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user