mirror of
https://github.com/intel/llvm.git
synced 2026-01-24 00:20:25 +08:00
[mlir][IR][NFC] PostDominanceInfo: Mark all functions as const (#115597)
Same as `DominanceInfo`, all functions should be `const`.
This commit is contained in:
committed by
GitHub
parent
e375c0f7d0
commit
595f3e925a
@@ -202,20 +202,20 @@ public:
|
||||
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);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user