[PATCH] D108114: [LoopPeel] Peel if it turns invariant loads dereferenceable.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 8 02:23:30 PDT 2021


fhahn marked 4 inline comments as done.
fhahn added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/LoopPeel.cpp:176
+                                                      ScalarEvolution &SE) {
+  bool ReadTurnsDeref = false;
+  // Skip loops with a single exiting block, because there should be no benefit
----------------
nikic wrote:
> This variable is initialized to false and then never changed?
Thanks, that's a leftover from earlier. Removed


================
Comment at: llvm/lib/Transforms/Utils/LoopPeel.cpp:183
+  // All non-latch exits need to be terminated by unreachable. Otherwise the
+  // heuristic below may not be profitable.
+  SmallVector<BasicBlock *, 4> Exits;
----------------
mkazantsev wrote:
> Can we reuse logic from D110922? OK if it's done in a follow-up, just consider this.
I just saw that D110922 got reverted again. I'll submit a follow-up once the patch has settled.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108114



More information about the llvm-commits mailing list