[PATCH] D68191: Simplify function llvm::removeUnreachableBlocks() to avoid (re-)computation.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 1 05:47:03 PDT 2019


fhahn added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/Local.cpp:2229
   SmallSetVector<BasicBlock *, 8> DeadBlockSet;
   for (Function::iterator I = ++F.begin(), E = F.end(); I != E; ++I) {
     auto *BB = &*I;
----------------
This can now be just `for (BasicBlock &BB : F) {` I think, as we do not modify the BB list


Repository:
  rL LLVM

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

https://reviews.llvm.org/D68191





More information about the llvm-commits mailing list