[PATCH] D155395: [SimplifyCFG] Remove identical successors in switch instructions in simple cases.

DianQK via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 16 03:01:58 PDT 2023


DianQK added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/SimplifyCFG.cpp:6810
+    return false;
+  }
+  auto BB1Itr = BB1->instructionsWithoutDebug();
----------------
xbolva00 wrote:
> return false when BB´s sizes are not same?
We don't need to consider the same instances of BB, as this is already the expected result. If we still replace the same instances of BB, the update for DTU will become complicated.
But this logic is actually contrary to the semantics of this function. Let me revise it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D155395



More information about the llvm-commits mailing list