Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions mlir/include/mlir/IR/Dominance.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,20 +202,20 @@ class PostDominanceInfo : public detail::DominanceInfoBase</*IsPostDom=*/true> {
using super::super;

/// Return true if operation A properly postdominates operation B.
bool properlyPostDominates(Operation *a, Operation *b);
bool properlyPostDominates(Operation *a, Operation *b) const;

/// Return true if operation A postdominates operation B.
bool postDominates(Operation *a, Operation *b) {
bool postDominates(Operation *a, Operation *b) const {
return a == b || properlyPostDominates(a, b);
}

/// Return true if the specified block A properly postdominates block B.
bool properlyPostDominates(Block *a, Block *b) {
bool properlyPostDominates(Block *a, Block *b) const {
return super::properlyDominates(a, b);
}

/// Return true if the specified block A postdominates block B.
bool postDominates(Block *a, Block *b) {
bool postDominates(Block *a, Block *b) const {
return a == b || properlyPostDominates(a, b);
}
};
Expand Down
3 changes: 2 additions & 1 deletion mlir/lib/IR/Dominance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,8 @@ bool DominanceInfo::properlyDominates(Value a, Operation *b) const {
//===----------------------------------------------------------------------===//

/// Returns true if statement 'a' properly postdominates statement b.
bool PostDominanceInfo::properlyPostDominates(Operation *a, Operation *b) {
bool PostDominanceInfo::properlyPostDominates(Operation *a,
Operation *b) const {
auto *aBlock = a->getBlock(), *bBlock = b->getBlock();
assert(aBlock && bBlock && "operations must be in a block");

Expand Down