[Mlir-commits] [mlir] [mlir][IR] Fix inconsistency in block/op dominance (PR #115413)
Matthias Springer
llvmlistbot at llvm.org
Thu Nov 7 18:56:02 PST 2024
================
@@ -176,9 +176,14 @@ class DominanceInfo : public detail::DominanceInfoBase</*IsPostDom=*/false> {
/// Return true if the specified block A properly dominates block B, i.e.: if
/// block A contains block B, or if the region which contains block A also
/// contains block B or some parent of block B and block A dominates that
- /// block in that kind of region. In an SSACFG region, block A dominates
- /// block B if all control flow paths from the entry block to block B flow
- /// through block A. In a Graph region, all blocks dominate all other blocks.
+ /// block in that kind of region.
+ ///
+ /// In an SSACFG region, block A dominates block B if all control flow paths
+ /// from the entry block to block B flow through block A.
+ ///
+ /// Graph regions have only a single block. To be consistent with "proper
----------------
matthias-springer wrote:
Note: This could also go the other way. We could say that an operation does not dominate itself in a graph region. But I find the current definition a bit more intuitive. (Considering that "dominance" does not exist in a graph region, so it does not matter at all which ops we are "comparing" in the same region.)
https://github.com/llvm/llvm-project/pull/115413
More information about the Mlir-commits
mailing list