aboutsummaryrefslogtreecommitdiff
path: root/include/llvm
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-04-28 21:25:41 +0000
committerChris Lattner <sabre@nondot.org>2002-04-28 21:25:41 +0000
commit3330e5be7ad80f89fd2baf8e153df97f23e04e7e (patch)
tree9e5d79c8870f52c5439d307294d2c2d8cd3e6ca4 /include/llvm
parentd30efaf56ed1e374240b4c2fe2ea7054cbd7cb52 (diff)
Move FunctionPass::doesNotModifyCFG to AnalysisUsage::preservesCFG()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2384 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/Pass.h23
1 files changed, 11 insertions, 12 deletions
diff --git a/include/llvm/Pass.h b/include/llvm/Pass.h
index 251620cf9a..dbe485284c 100644
--- a/include/llvm/Pass.h
+++ b/include/llvm/Pass.h
@@ -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; }