[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 459f1cc82b7e9a220a053921127405d54d599544..85555a0ca50f3762f875d66de6d678e88431b1e0 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) {