[all-commits] [llvm/llvm-project] 2d4247: [mlir][IR][NFC] `DominanceInfo`: Share same impl f...
Matthias Springer via All-commits
all-commits at lists.llvm.org
Sat Jan 4 00:12:25 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2d424765f496410d6ab95a80c90d2eda933d66d4
https://github.com/llvm/llvm-project/commit/2d424765f496410d6ab95a80c90d2eda933d66d4
Author: Matthias Springer <me at m-sp.org>
Date: 2025-01-04 (Sat, 04 Jan 2025)
Changed paths:
M mlir/include/mlir/IR/Dominance.h
M mlir/lib/IR/Dominance.cpp
Log Message:
-----------
[mlir][IR][NFC] `DominanceInfo`: Share same impl for block/op dominance (#115587)
The `properlyDominates` implementations for blocks and ops are very
similar. This commit replaces them with a single implementation that
operates on block iterators. That implementation can be used to
implement both `properlyDominates` variants.
Before:
```c++
template <bool IsPostDom>
bool DominanceInfoBase<IsPostDom>::properlyDominatesImpl(Block *a,
Block *b) const;
template <bool IsPostDom>
bool DominanceInfoBase<IsPostDom>::properlyDominatesImpl(
Operation *a, Operation *b, bool enclosingOpOk) const;
```
After:
```c++
template <bool IsPostDom>
bool DominanceInfoBase<IsPostDom>::properlyDominatesImpl(
Block *aBlock, Block::iterator aIt, Block *bBlock, Block::iterator bIt,
bool enclosingOk) const;
```
Note: A subsequent commit will add a new public `properlyDominates`
overload that accepts block iterators. That functionality can then be
used to find a valid insertion point at which a range of values is
defined (by utilizing post dominance).
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list