From: Craig Topper Date: Thu, 23 Jul 2015 07:33:48 +0000 (+0000) Subject: [ScalarEvolution] Change addRequired to addRequiredTransitive on two passes where... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=25544b1bcef0205c2c551440fa58f7532bf7901c;p=oota-llvm.git [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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242989 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index 459f1cc82b7..85555a0ca50 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/lib/Analysis/ScalarEvolution.cpp @@ -8107,10 +8107,10 @@ void ScalarEvolution::releaseMemory() { void ScalarEvolution::getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); - AU.addRequired(); + AU.addRequiredTransitive(); AU.addRequiredTransitive(); AU.addRequiredTransitive(); - AU.addRequired(); + AU.addRequiredTransitive(); } bool ScalarEvolution::hasLoopInvariantBackedgeTakenCount(const Loop *L) {