Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
Show First 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | public: | ||||
CorrelatedValuePropagation(): FunctionPass(ID) { | CorrelatedValuePropagation(): FunctionPass(ID) { | ||||
initializeCorrelatedValuePropagationPass(*PassRegistry::getPassRegistry()); | initializeCorrelatedValuePropagationPass(*PassRegistry::getPassRegistry()); | ||||
} | } | ||||
bool runOnFunction(Function &F) override; | bool runOnFunction(Function &F) override; | ||||
void getAnalysisUsage(AnalysisUsage &AU) const override { | void getAnalysisUsage(AnalysisUsage &AU) const override { | ||||
AU.addRequired<DominatorTreeWrapperPass>(); | |||||
AU.addRequired<LazyValueInfoWrapperPass>(); | AU.addRequired<LazyValueInfoWrapperPass>(); | ||||
AU.addPreserved<GlobalsAAWrapperPass>(); | AU.addPreserved<GlobalsAAWrapperPass>(); | ||||
} | } | ||||
}; | }; | ||||
} // end anonymous namespace | } // end anonymous namespace | ||||
char CorrelatedValuePropagation::ID = 0; | char CorrelatedValuePropagation::ID = 0; | ||||
INITIALIZE_PASS_BEGIN(CorrelatedValuePropagation, "correlated-propagation", | INITIALIZE_PASS_BEGIN(CorrelatedValuePropagation, "correlated-propagation", | ||||
"Value Propagation", false, false) | "Value Propagation", false, false) | ||||
INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass) | |||||
INITIALIZE_PASS_DEPENDENCY(LazyValueInfoWrapperPass) | INITIALIZE_PASS_DEPENDENCY(LazyValueInfoWrapperPass) | ||||
INITIALIZE_PASS_END(CorrelatedValuePropagation, "correlated-propagation", | INITIALIZE_PASS_END(CorrelatedValuePropagation, "correlated-propagation", | ||||
"Value Propagation", false, false) | "Value Propagation", false, false) | ||||
// Public interface to the Value Propagation pass | // Public interface to the Value Propagation pass | ||||
Pass *llvm::createCorrelatedValuePropagationPass() { | Pass *llvm::createCorrelatedValuePropagationPass() { | ||||
return new CorrelatedValuePropagation(); | return new CorrelatedValuePropagation(); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 555 Lines • Show Last 20 Lines |