This is an archive of the discontinued LLVM Phabricator instance.

[MLIR] Fix dominance info method - properlyDominates
AbandonedPublic

Authored by bondhugula on Apr 13 2020, 3:26 AM.

Details

Summary

Fix properlyDominates for the case where an operation could dominate
another one appearing before it in the same block. The only paths to the
latter could be from the former.

Diff Detail

Event Timeline

bondhugula created this revision.Apr 13 2020, 3:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 13 2020, 3:26 AM

Update comments.

Harbormaster completed remote builds in B52925: Diff 256955.

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().

It could be part of an unreachable cycle or something like that, in which the same (lack of) dominance properties hold.

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.

bondhugula abandoned this revision.Apr 15 2020, 12:56 PM

Abandoning this for want of more clarity...