[PATCH] D108108: [LoopPeel] Allow peeling with multiple unreachable-terminated exit blocks.

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 17 09:13:10 PDT 2021


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

LGTM w/comment suggested.



================
Comment at: llvm/lib/Transforms/Utils/LoopPeel.cpp:105
+  // The latch must either be the only exiting block or all non-latch exit
+  // blocks are either have an deopt or unreachable terminator.
+  return all_of(Exits, [](const BasicBlock *BB) {
----------------
Can you add something to this comment to indicate that a) this is a proxy for a strong profile prediction of untaken, and b) this is a profitability check not a legality check?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108108



More information about the llvm-commits mailing list