[PATCH] D91767: [DomTree][NFC] Introduce function that finds common dom of multiple instructions

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 22 23:50:51 PST 2020


mkazantsev added inline comments.


================
Comment at: llvm/lib/IR/Dominators.cpp:373
+  }
+  return CommonDom;
+}
----------------
kuhar wrote:
> Maybe assert that `CommDom` actually dominates all `Insns` when `EXPENSIVE_CHECKS` are enabled?
`dominates(def, use)` has a slightly different semantics and fails for `dominates(x, x)`. I also think ther will be tricky corner cases when it will fail when both args are Phis from the same block.


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

https://reviews.llvm.org/D91767



More information about the llvm-commits mailing list