The PreVerifier pass preserves everything. In practice, this
authorChris Lattner <sabre@nondot.org>
Mon, 1 Dec 2008 03:58:38 +0000 (03:58 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 1 Dec 2008 03:58:38 +0000 (03:58 +0000)
prevents the passmgr from adding yet-another domtree invocation
for Verifier if there is already one live.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60326 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/Verifier.cpp

index 366294138b704f9ff406294ca3c685b83c8e4826..27c640e9175d77acd7f9c1d5da07bb6451a5dbe9 100644 (file)
@@ -72,6 +72,10 @@ namespace {  // Anonymous namespace for class
 
     PreVerifier() : FunctionPass(&ID) { }
 
+    virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+      AU.setPreservesAll();
+    }
+
     // Check that the prerequisites for successful DominatorTree construction
     // are satisfied.
     bool runOnFunction(Function &F) {