[PATCH] D93734: [LoopDeletion] Insert an early exit from dead path in loop

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 9 13:42:10 PST 2021


jonpa added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/LoopDeletion.cpp:110
   for (auto &I : L->blocks())
-    if (any_of(*I, [](Instruction &I) {
-          return I.mayHaveSideEffects() && !I.isDroppable();
-        }))
+    if (BBHasSideEffects(I))
       return false;
----------------
jdoerfert wrote:
> DriveBy:
> 
> This hurts. I know it was there before but `auto &I` is `BasicBlock *`... argh.
> Could we please change that if we commit this to a `auto *` at least with a sensible variable name.
I think it's better in that case perhaps to just commit such an NFC change separately beforehand?



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

https://reviews.llvm.org/D93734



More information about the llvm-commits mailing list