[all-commits] [llvm/llvm-project] 62bf77: [mlir][IR] Add `notifyBlockRemoved` callback to li...
Matthias Springer via All-commits
all-commits at lists.llvm.org
Sun Jan 21 01:07:06 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 62bf7710ff295cc7bb0bb281c471ca0c91fd156e
https://github.com/llvm/llvm-project/commit/62bf7710ff295cc7bb0bb281c471ca0c91fd156e
Author: Matthias Springer <me at m-sp.org>
Date: 2024-01-21 (Sun, 21 Jan 2024)
Changed paths:
M mlir/include/mlir/IR/PatternMatch.h
M mlir/lib/Conversion/VectorToGPU/VectorToGPU.cpp
M mlir/lib/IR/PatternMatch.cpp
M mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
Log Message:
-----------
[mlir][IR] Add `notifyBlockRemoved` callback to listener (#78306)
There is already a "block inserted" notification (in
`OpBuilder::Listener`), so there should also be a "block removed"
notification.
The purpose of this change is to make the listener API more mature.
There is currently a gap between what kind of IR changes can be made and
what IR changes can be listened to. At the moment, the only way to
inform listeners about "block removal" is to send a manual
`notifyOperationModified` for the parent op (e.g., by wrapping the
`eraseBlock(b)` method call in `updateRootInPlace(b->getParentOp())`).
This tells the listener that *something* has changed, but it is somewhat
of an API abuse.
More information about the All-commits
mailing list