summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-05-06 19:31:16 +0000
committerChris Lattner <sabre@nondot.org>2002-05-06 19:31:16 +0000
commit4445519fab769d36f5a97466f5cfe1c618c44921 (patch)
tree1fc062bcf77324b363b579e596a84ebbc0d0c188 /include
parentd661937352ab5c2fb7c43abb75e0452cb7001750 (diff)
downloadexternal_llvm-4445519fab769d36f5a97466f5cfe1c618c44921.zip
external_llvm-4445519fab769d36f5a97466f5cfe1c618c44921.tar.gz
external_llvm-4445519fab769d36f5a97466f5cfe1c618c44921.tar.bz2
Add support for passes to announce that they only depend on the CFG of a
function. This is crude but effective git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2505 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Pass.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/llvm/Pass.h b/include/llvm/Pass.h
index 3c89130..f604921 100644
--- a/include/llvm/Pass.h
+++ b/include/llvm/Pass.h
@@ -219,6 +219,15 @@ public:
return AnalysisID(NextID++, CreatePass<AnalysisType>);
}
+ // Special Copy Constructor - This is how analysis passes declare that they
+ // only depend on the CFG of the function they are working on, so they are not
+ // invalidated by other passes that do not modify the CFG. This should be
+ // used like this:
+ // AnalysisID DominatorSet::ID(AnalysisID::create<DominatorSet>(), true);
+ //
+ AnalysisID(const AnalysisID &AID, bool DependsOnlyOnCFG = false);
+
+
inline Pass *createPass() const { return Constructor(*this); }
inline bool operator==(const AnalysisID &A) const {