]> granicus.if.org Git - llvm/commitdiff
Make DT a transitive dependency of LI.
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Wed, 17 Jul 2019 23:31:59 +0000 (23:31 +0000)
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Wed, 17 Jul 2019 23:31:59 +0000 (23:31 +0000)
Summary:
LoopInfoWrapperPass::verify uses DT, which means DT must be alive
even if it has no direct users.

Fixes a crash in expensive checks mode.

Reviewers: pcc, leonardchan

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D64896

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

lib/Analysis/LoopInfo.cpp

index c59e48a7a98e1b105f3199656bc40e8de19c6673..aa5da0859805f07d576a86c2d91d16efe7c9fdd8 100644 (file)
@@ -1039,7 +1039,7 @@ void LoopInfoWrapperPass::verifyAnalysis() const {
 
 void LoopInfoWrapperPass::getAnalysisUsage(AnalysisUsage &AU) const {
   AU.setPreservesAll();
-  AU.addRequired<DominatorTreeWrapperPass>();
+  AU.addRequiredTransitive<DominatorTreeWrapperPass>();
 }
 
 void LoopInfoWrapperPass::print(raw_ostream &OS, const Module *) const {