[ScalarEvolution] Change addRequired to addRequiredTransitive on two passes where...
authorCraig Topper <craig.topper@gmail.com>
Thu, 23 Jul 2015 07:33:48 +0000 (07:33 +0000)
committerCraig Topper <craig.topper@gmail.com>
Thu, 23 Jul 2015 07:33:48 +0000 (07:33 +0000)
This prevents the pointers from dangling when those passes are freed.

http://reviews.llvm.org/D11236
Patch by Steve King.

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

lib/Analysis/ScalarEvolution.cpp

index 459f1cc..85555a0 100644 (file)
@@ -8107,10 +8107,10 @@ void ScalarEvolution::releaseMemory() {
 
 void ScalarEvolution::getAnalysisUsage(AnalysisUsage &AU) const {
   AU.setPreservesAll();
-  AU.addRequired<AssumptionCacheTracker>();
+  AU.addRequiredTransitive<AssumptionCacheTracker>();
   AU.addRequiredTransitive<LoopInfoWrapperPass>();
   AU.addRequiredTransitive<DominatorTreeWrapperPass>();
-  AU.addRequired<TargetLibraryInfoWrapperPass>();
+  AU.addRequiredTransitive<TargetLibraryInfoWrapperPass>();
 }
 
 bool ScalarEvolution::hasLoopInvariantBackedgeTakenCount(const Loop *L) {