summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar
diff options
context:
space:
mode:
authorSanjoy Das <sanjoy@playingwithpointers.com>2016-05-03 17:50:11 +0000
committerSanjoy Das <sanjoy@playingwithpointers.com>2016-05-03 17:50:11 +0000
commit4ae3920c5b143016ccb1d10d1747f26829c449d5 (patch)
tree7cfffdc9648e53a2ceb2f5476647dca8fa94cb46 /llvm/lib/Transforms/Scalar
parent7e7a5a050ab4f424a2a5832567f3ee2093aa0926 (diff)
downloadbcm5719-llvm-4ae3920c5b143016ccb1d10d1747f26829c449d5.tar.gz
bcm5719-llvm-4ae3920c5b143016ccb1d10d1747f26829c449d5.zip
[LICM] Kill SCEV loop dispositions if needed
SCEV caches whether SCEV expressions are loop invariant, variant or computable. LICM breaks this cache, almost by definition; so clear the SCEV disposition cache if LICM changed anything. llvm-svn: 268408
Diffstat (limited to 'llvm/lib/Transforms/Scalar')
-rw-r--r--llvm/lib/Transforms/Scalar/LICM.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/LICM.cpp b/llvm/lib/Transforms/Scalar/LICM.cpp
index 72f04165e66..e6ad42bb4c3 100644
--- a/llvm/lib/Transforms/Scalar/LICM.cpp
+++ b/llvm/lib/Transforms/Scalar/LICM.cpp
@@ -258,6 +258,10 @@ bool LICM::runOnLoop(Loop *L, LPPassManager &LPM) {
LoopToAliasSetMap[L] = CurAST;
else
delete CurAST;
+
+ if (Changed)
+ if (auto *SEWP = getAnalysisIfAvailable<ScalarEvolutionWrapperPass>())
+ SEWP->getSE().forgetLoopDispositions(L);
return Changed;
}
OpenPOWER on IntegriCloud