[PATCH] D110456: [CodeMoverUtils] Enhance isSafeToMoveBefore() when control flow equivalence is satisfied

Congzhe Cao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 27 12:44:13 PDT 2021


congzhe marked 2 inline comments as done.
congzhe added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/CodeMoverUtils.cpp:440
+                                   const PostDominatorTree *PDT) {
+  const BasicBlock *CommonDominator =
+      DT->findNearestCommonDominator(ThisBlock, OtherBlock);
----------------
Whitney wrote:
> How about adding `assert(isControlFlowEquivalent(*ThisBlock, *OtherBlock, *DT, *PDT));`?
Thanks, all comments addressed.


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

https://reviews.llvm.org/D110456



More information about the llvm-commits mailing list