[PATCH] D89911: [PartialInliner]: Handle code regions in a switch stmt cases

Whitney Tsang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 21 16:16:22 PDT 2020


Whitney added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/PartialInlining.cpp:418
   auto IsSingleEntry = [](SmallVectorImpl<BasicBlock *> &BlockList) {
+    if (BlockList.size() == 1)
+      return true;
----------------
This change allows the single basic block to have multiple predecessor, which is what this function want to avoid.
How about changing `BlockList.size() > 1 &&` to `BlockList.size() >= 1 &&`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D89911



More information about the llvm-commits mailing list