[PATCH] D78806: SplitIndirectBrCriticalEdges: Fix Branch Probability update

Hiroshi Yamauchi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 30 18:07:44 PDT 2020


yamauchi added inline comments.


================
Comment at: llvm/unittests/Transforms/Utils/BasicBlockUtilsTest.cpp:146
+
+  std::unique_ptr<Module> M = parseIR(
+    C,
----------------
Can you clang-format this code (as the lint check)?


================
Comment at: llvm/unittests/Transforms/Utils/BasicBlockUtilsTest.cpp:169
+
+  auto Block = [&F](StringRef BBName) -> const BasicBlock & {
+    for (auto &BB : *F)
----------------
Relying on the block name ".split" (that SplitIndirectBrCriticalEdges internally uses) may be a bit fragile. How about finding the block that's the predecessor of bb2/bb3?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78806





More information about the llvm-commits mailing list