llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-mlir Author: Matthias Springer (matthias-springer) <details> <summary>Changes</summary> Same as `DominanceInfo`, all functions should be `const`. Depends on #<!-- -->115587. --- Full diff: https://github.com/llvm/llvm-project/pull/115597.diff 2 Files Affected: - (modified) mlir/include/mlir/IR/Dominance.h (+4-4) - (modified) mlir/lib/IR/Dominance.cpp (+2-2) ``````````diff diff --git a/mlir/include/mlir/IR/Dominance.h b/mlir/include/mlir/IR/Dominance.h index a6b2475e12b1c6..63504cad211a4d 100644 --- a/mlir/include/mlir/IR/Dominance.h +++ b/mlir/include/mlir/IR/Dominance.h @@ -196,18 +196,18 @@ class PostDominanceInfo : public detail::DominanceInfoBase</*IsPostDom=*/true> { /// Return true if operation A properly postdominates operation B. bool properlyPostDominates(Operation *a, Operation *b, - bool enclosingOpOk = true); + bool enclosingOpOk = true) 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 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); } }; diff --git a/mlir/lib/IR/Dominance.cpp b/mlir/lib/IR/Dominance.cpp index 25bdc32dd6a2a7..1c54e09d29b9b5 100644 --- a/mlir/lib/IR/Dominance.cpp +++ b/mlir/lib/IR/Dominance.cpp @@ -352,13 +352,13 @@ bool DominanceInfo::properlyDominates(Value a, Operation *b) const { //===----------------------------------------------------------------------===// bool PostDominanceInfo::properlyPostDominates(Operation *a, Operation *b, - bool enclosingOpOk) { + bool enclosingOpOk) const { return super::properlyDominatesImpl(a->getBlock(), a->getIterator(), b->getBlock(), b->getIterator(), enclosingOpOk); } -bool PostDominanceInfo::properlyPostDominates(Block *a, Block *b) { +bool PostDominanceInfo::properlyPostDominates(Block *a, Block *b) const { return super::properlyDominatesImpl(a, a->end(), b, b->end(), /*enclosingOk=*/true); } `````````` </details> https://github.com/llvm/llvm-project/pull/115597 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits