mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-04 01:11:44 +00:00
Move FunctionPass::doesNotModifyCFG to AnalysisUsage::preservesCFG()
llvm-svn: 2384
This commit is contained in:
parent
c64ef6740a
commit
c74c58800a
@ -138,18 +138,6 @@ struct FunctionPass : public Pass {
|
||||
//
|
||||
bool run(Function *F);
|
||||
|
||||
protected:
|
||||
// doesNotModifyCFG - This function should be called by our subclasses to
|
||||
// implement the getAnalysisUsage virtual function, iff they do not:
|
||||
//
|
||||
// 1. Add or remove basic blocks from the function
|
||||
// 2. Modify terminator instructions in any way.
|
||||
//
|
||||
// This function annotates the AnalysisUsage info object to say that analyses
|
||||
// that only depend on the CFG are preserved by this pass.
|
||||
//
|
||||
void doesNotModifyCFG(AnalysisUsage &Info);
|
||||
|
||||
private:
|
||||
friend class PassManagerT<Module>;
|
||||
friend class PassManagerT<Function>;
|
||||
@ -277,6 +265,17 @@ public:
|
||||
void setPreservesAll() { PreservesAll = true; }
|
||||
bool preservesAll() const { return PreservesAll; }
|
||||
|
||||
// preservesCFG - This function should be called to by the pass, iff they do
|
||||
// not:
|
||||
//
|
||||
// 1. Add or remove basic blocks from the function
|
||||
// 2. Modify terminator instructions in any way.
|
||||
//
|
||||
// This function annotates the AnalysisUsage info object to say that analyses
|
||||
// that only depend on the CFG are preserved by this pass.
|
||||
//
|
||||
void preservesCFG();
|
||||
|
||||
const std::vector<AnalysisID> &getRequiredSet() const { return Required; }
|
||||
const std::vector<AnalysisID> &getPreservedSet() const { return Preserved; }
|
||||
const std::vector<AnalysisID> &getProvidedSet() const { return Provided; }
|
||||
|
@ -24,6 +24,21 @@ void AnalysisResolver::setAnalysisResolver(Pass *P, AnalysisResolver *AR) {
|
||||
P->Resolver = AR;
|
||||
}
|
||||
|
||||
|
||||
// preservesCFG - This function should be called to by the pass, iff they do
|
||||
// not:
|
||||
//
|
||||
// 1. Add or remove basic blocks from the function
|
||||
// 2. Modify terminator instructions in any way.
|
||||
//
|
||||
// This function annotates the AnalysisUsage info object to say that analyses
|
||||
// that only depend on the CFG are preserved by this pass.
|
||||
//
|
||||
void AnalysisUsage::preservesCFG() {
|
||||
// FIXME: implement preservesCFG
|
||||
}
|
||||
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// PassManager implementation - The PassManager class is a simple Pimpl class
|
||||
// that wraps the PassManagerT template.
|
||||
@ -142,20 +157,6 @@ void FunctionPass::addToPassManager(PassManagerT<Function> *PM,
|
||||
PM->addPass(this, AU);
|
||||
}
|
||||
|
||||
// doesNotModifyCFG - This function should be called by our subclasses to
|
||||
// implement the getAnalysisUsage virtual function, iff they do not:
|
||||
//
|
||||
// 1. Add or remove basic blocks from the function
|
||||
// 2. Modify terminator instructions in any way.
|
||||
//
|
||||
// This function annotates the AnalysisUsage info object to say that analyses
|
||||
// that only depend on the CFG are preserved by this pass.
|
||||
//
|
||||
void FunctionPass::doesNotModifyCFG(AnalysisUsage &Info) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// BasicBlockPass Implementation
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user