X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=lib%2FTransforms%2FUtils%2FLoopUnroll.cpp;h=971f01b72a16ab46f1104c0ed33f735ce345cbd8;hp=6e7a571da51626c6a818d72dfa878e5a7f9f8e7b;hb=bfe1f1c5a398ea83e108f91f7bd3d7e2ec00c6c0;hpb=df8fbfc774ec06f4d2f8fd3e1b917d45cdac8fde diff --git a/lib/Transforms/Utils/LoopUnroll.cpp b/lib/Transforms/Utils/LoopUnroll.cpp index 6e7a571da51..971f01b72a1 100644 --- a/lib/Transforms/Utils/LoopUnroll.cpp +++ b/lib/Transforms/Utils/LoopUnroll.cpp @@ -110,10 +110,11 @@ FoldBlockIntoPredecessor(BasicBlock *BB, LoopInfo* LI, LPPassManager *LPM, // ScalarEvolution holds references to loop exit blocks. if (LPM) { - if (ScalarEvolution *SE = LPM->getAnalysisIfAvailable()) { + if (auto *SEWP = + LPM->getAnalysisIfAvailable()) { if (Loop *L = LI->getLoopFor(BB)) { if (ForgottenLoops.insert(L).second) - SE->forgetLoop(L); + SEWP->getSE().forgetLoop(L); } } } @@ -232,8 +233,9 @@ bool llvm::UnrollLoop(Loop *L, unsigned Count, unsigned TripCount, // Notify ScalarEvolution that the loop will be substantially changed, // if not outright eliminated. - ScalarEvolution *SE = - PP ? PP->getAnalysisIfAvailable() : nullptr; + auto *SEWP = + PP ? PP->getAnalysisIfAvailable() : nullptr; + ScalarEvolution *SE = SEWP ? &SEWP->getSE() : nullptr; if (SE) SE->forgetLoop(L);