diff options
author | Craig Topper <craig.topper@gmail.com> | 2015-07-23 07:33:48 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2015-07-23 07:33:48 +0000 |
commit | ac7947ec321dad30e5ef31574a7c0ed5636a3578 (patch) | |
tree | 4a90e511f60d84f230f657a350a16cabdc8e1754 /llvm/lib | |
parent | db2888fa2821e7391ddadc1ef370a68cf14e7db6 (diff) | |
download | bcm5719-llvm-ac7947ec321dad30e5ef31574a7c0ed5636a3578.tar.gz bcm5719-llvm-ac7947ec321dad30e5ef31574a7c0ed5636a3578.zip |
[ScalarEvolution] Change addRequired to addRequiredTransitive on two passes where ScalarEvolution stores long lived raw pointers to objects those passes own.
This prevents the pointers from dangling when those passes are freed.
http://reviews.llvm.org/D11236
Patch by Steve King.
llvm-svn: 242989
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Analysis/ScalarEvolution.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index 459f1cc82b7..85555a0ca50 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/lib/Analysis/ScalarEvolution.cpp @@ -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) { |