[PATCH] D45945: [LoopRotate] Fix incorrect SCEV invalidation in loop rotation

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 23 19:13:57 PDT 2018


mkazantsev marked an inline comment as done.
mkazantsev added inline comments.


================
Comment at: llvm/trunk/lib/Transforms/Utils/LoopRotationUtils.cpp:262
   // Anything ScalarEvolution may know about this loop or the PHI nodes
-  // in its header will soon be invalidated.
+  // in its header will soon be invalidated, and it can also affect its parent
+  // loops as well.
----------------
sanjoy wrote:
> Can you please add a comment on *how* we can affect parent loops?  Rotating an inner loop should not change the trip count of outer loops so right now the statement sounds a bit confusing.  Perhaps:  "Loop rotation can change the dominance relationships between blocks in the inner loop and blocks in the outer loop.  It may also delete blocks from the inner loop.  Both of these may end up violating invariants in backedge taken infos cached by SCEV about outer loops."
Done at https://reviews.llvm.org/rL330677


Repository:
  rL LLVM

https://reviews.llvm.org/D45945





More information about the llvm-commits mailing list