[PATCH] D78012: [MLIR] Fix dominance info method - properlyDominates
Uday Bondhugula via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 13 09:39:45 PDT 2020
bondhugula added a comment.
In D78012#1977945 <https://reviews.llvm.org/D78012#1977945>, @lattner wrote:
> Thank you for tackling this Uday!
>
> The right check here is to see if the block isReachableFromEntry (which is a method of dominator set), not hasNoPredecessors().
Looks like I jumped on to the revision too quickly - but what you suggest above and the LLVM one goes against my understanding of the dominance model. Even if the use is unreachable from the entry, with this revision, you only consider it dominated if the def dominates the use (within that unreachable part). See lines 206-208 in the revision - hasNoPredecessors() isn't the only thing I'm doing. We could discuss this on the discussion forum first.
> It could be part of an unreachable cycle or something like that, in which the same (lack of) dominance properties hold.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78012/new/
https://reviews.llvm.org/D78012
More information about the llvm-commits
mailing list