[PATCH] D136461: llvm-reduce: Fix block reduction with unreachable blocks

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 21 16:02:28 PDT 2022


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

nice!



================
Comment at: llvm/tools/llvm-reduce/deltas/ReduceBasicBlocks.cpp:137
+    BasicBlock &Entry = F.getEntryBlock();
+    for (auto *BB : depth_first_ext(&Entry, Reachable)) {
+      (void)BB;
----------------
remove parens


================
Comment at: llvm/tools/llvm-reduce/deltas/ReduceBasicBlocks.cpp:199
+      // Delete the dead blocks.
+      DeleteDeadBlocks(DeadBlocks, nullptr, /*KeepOneInputPHIs*/ false);
+      DeadBlocks.clear();
----------------
probably not super important, but keeping phis limits the instructions that the basic block pass messes with


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

https://reviews.llvm.org/D136461



More information about the llvm-commits mailing list