[all-commits] [llvm/llvm-project] 584af0: [mlir][IR] Rename `notify*Removed` to `notify*Erased`
Matthias Springer via All-commits
all-commits at lists.llvm.org
Tue Feb 20 00:00:18 PST 2024
Branch: refs/heads/users/matthias-springer/notify_operation_erased
Home: https://github.com/llvm/llvm-project
Commit: 584af073c376edfeb622177400e08da9d068eada
https://github.com/llvm/llvm-project/commit/584af073c376edfeb622177400e08da9d068eada
Author: Matthias Springer <springerm at google.com>
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] Rename `notify*Removed` to `notify*Erased`
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