[all-commits] [llvm/llvm-project] 914e60: [mlir][IR][NFC] Rename `notify*Removed` to `notify...
Matthias Springer via All-commits
all-commits at lists.llvm.org
Tue Feb 20 00:08:31 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 914e60748729387f45919e42335723eb9d2df460
https://github.com/llvm/llvm-project/commit/914e60748729387f45919e42335723eb9d2df460
Author: Matthias Springer <me at m-sp.org>
Date: 2024-02-20 (Tue, 20 Feb 2024)
Changed paths:
M mlir/include/mlir/Dialect/Transform/IR/TransformInterfaces.h
M mlir/include/mlir/IR/PatternMatch.h
M mlir/lib/Dialect/Bufferization/Transforms/Bufferize.cpp
M mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
M mlir/lib/Dialect/Transform/IR/TransformInterfaces.cpp
M mlir/lib/IR/PatternMatch.cpp
M mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
M mlir/test/Transforms/test-strict-pattern-driver.mlir
M mlir/test/lib/Dialect/Test/TestPatterns.cpp
M mlir/test/lib/Transforms/TestConstantFold.cpp
Log Message:
-----------
[mlir][IR][NFC] Rename `notify*Removed` to `notify*Erased` (#82253)
Rename listener callback names:
* `notifyOperationRemoved` -> `notifyOperationErased`
* `notifyBlockRemoved` -> `notifyBlockErased`
The current callback names are misnomers. The callbacks are triggered
when an operation/block is erased, not when it is removed (unlinked).
E.g.:
```c++
/// Notify the listener that the specified operation is about to be erased.
/// At this point, the operation has zero uses.
///
/// Note: This notification is not triggered when unlinking an operation.
virtual void notifyOperationErased(Operation *op) {}
```
This change is in preparation of adding listener support to the dialect
conversion. The dialect conversion internally unlinks IR before erasing
it at a later point of time. There is an important difference between
"remove" and "erase". Lister callback names should be accurate to avoid
confusion.
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