[PATCH] D64618: [Loop Peeling] Fix the bug with IDom setting for exit loops

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 12 10:42:38 PDT 2019


reames accepted this revision.
reames added a comment.
This revision is now accepted and ready to land.

LGTM.  An alternate implementation would be to require that each exit has one predecessor in the legality for peeling check.  Either would be fine, and if you want to do the alternate, you can land that without review..



================
Comment at: llvm/lib/Transforms/Utils/LoopUnrollPeel.cpp:588
+  if (DT)
+    for (auto Edge : ExitEdges) {
+      if (ExitIDom.count(Edge.second))
----------------
Please add an assert that L has dedicated exits, because that's the precondition for your dominance fact.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64618/new/

https://reviews.llvm.org/D64618





More information about the llvm-commits mailing list