aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
diff options
context:
space:
mode:
authorMax Kazantsev <max.kazantsev@azul.com>2018-04-24 02:08:05 +0000
committerMax Kazantsev <max.kazantsev@azul.com>2018-04-24 02:08:05 +0000
commit5a0a40b8cb9d82c9ff6202d17fdefd966f987aa9 (patch)
treee0c118790eaffba93fac98be3dd766cee9ee4416 /llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
parent24004d65a5781a6519a01de545b7bd273065b140 (diff)
downloadllvm-5a0a40b8cb9d82c9ff6202d17fdefd966f987aa9.zip
llvm-5a0a40b8cb9d82c9ff6202d17fdefd966f987aa9.tar.gz
llvm-5a0a40b8cb9d82c9ff6202d17fdefd966f987aa9.tar.bz2
[NFC] Add clarification comment
llvm-svn: 330677
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopRotationUtils.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/LoopRotationUtils.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp b/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
index d2a2e40..a7dc34f 100644
--- a/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
+++ b/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
@@ -259,8 +259,10 @@ bool LoopRotate::rotateLoop(Loop *L, bool SimplifiedLatch) {
return false;
// Anything ScalarEvolution may know about this loop or the PHI nodes
- // in its header will soon be invalidated, and it can also affect its parent
- // loops as well.
+ // in its header will soon be invalidated. We should also invalidate
+ // all outer loops because insertion and deletion of blocks that happens
+ // during the rotation may violate invariants related to backedge taken
+ // infos in them.
if (SE)
SE->forgetTopmostLoop(L);