-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[mlir][IR][NFC] PostDominanceInfo
: Mark all functions as const
#115597
[mlir][IR][NFC] PostDominanceInfo
: Mark all functions as const
#115597
Conversation
@llvm/pr-subscribers-mlir-core @llvm/pr-subscribers-mlir Author: Matthias Springer (matthias-springer) ChangesSame as Depends on #115587. Full diff: https://github.com/llvm/llvm-project/pull/115597.diff 2 Files Affected:
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);
}
|
9979c63
to
247e4db
Compare
caea72f
to
e890126
Compare
Same as `DominanceInfo`, all functions should be `const`.
e890126
to
943bd95
Compare
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/55/builds/3473 Here is the relevant piece of the build log for the reference
|
Same as
DominanceInfo
, all functions should beconst
.