[PATCH] D101044: [NFC][DSE]Change 'do-while' to 'for' loop to simplify code structure

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 28 09:02:50 PDT 2021


fhahn added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp:1347
 
       if (canSkipDef(CurrentDef, !isInvisibleToCallerBeforeRet(DefUO))) {
         continue;
----------------
The braces here and at the other changed lines are now redundant. Would be good to remove them.


================
Comment at: llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp:1411
         }
-        continue;
+        break;
       } else {
----------------
perhaps it would be simpler to just have the break as last statement of the loop?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101044



More information about the llvm-commits mailing list