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

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 12 04:20:31 PDT 2021


fhahn added a comment.

In D108114#3056044 <https://reviews.llvm.org/D108114#3056044>, @reames wrote:

> In D108114#3055669 <https://reviews.llvm.org/D108114#3055669>, @fhahn wrote:
>
>> @reames do the latest update / the recent responses address your concerns?
>
> Yep, you addressed the major concerns.  I think you could stand to wordsmith the function comment and submit message a bit to be clearer about the new heuristic, but the code addresses my concerns.

Thanks for confirming. I tried to adjust the message of the commit to make it more in line with the committed code.



================
Comment at: llvm/lib/Transforms/Utils/LoopPeel.cpp:225
+  for (BasicBlock *Exiting : ExitingBlocks)
+    if (LoadUsers.find(Exiting->getTerminator()) != LoadUsers.end())
+      return 1;
----------------
nikic wrote:
> nit: `LoadUsers.contains(Exiting->getTerminator())`?
Thanks, I unfortunately forgot to add this to the committed version, but I pushed a follow up which also uses `any_of` instead of the explicit loop: 40d85f16c45e


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