MLIR
18.0.0git
|
#include "mlir/IR/PatternMatch.h"
Public Member Functions | |
Listener () | |
virtual void | notifyOperationModified (Operation *op) |
Notify the listener that the specified operation was modified in-place. More... | |
virtual void | notifyOperationReplaced (Operation *op, Operation *replacement) |
Notify the listener that the specified operation is about to be replaced with another operation. More... | |
virtual void | notifyOperationReplaced (Operation *op, ValueRange replacement) |
Notify the listener that the specified operation is about to be replaced with the a range of values, potentially produced by other operations. More... | |
virtual void | notifyOperationRemoved (Operation *op) |
Notify the listener that the specified operation is about to be erased. More... | |
virtual LogicalResult | notifyMatchFailure (Location loc, function_ref< void(Diagnostic &)> reasonCallback) |
Notify the listener that the pattern failed to match the given operation, and provide a callback to populate a diagnostic with the reason why the failure occurred. More... | |
![]() | |
Listener () | |
virtual | ~Listener ()=default |
virtual void | notifyOperationInserted (Operation *op) |
Notification handler for when an operation is inserted into the builder. More... | |
virtual void | notifyBlockCreated (Block *block) |
Notification handler for when a block is created using the builder. More... | |
![]() | |
Kind | getKind () const |
Static Public Member Functions | |
static bool | classof (const OpBuilder::Listener *base) |
Additional Inherited Members | |
![]() | |
enum class | Kind { OpBuilderListener = 0 , RewriterBaseListener = 1 } |
The kind of listener. More... | |
![]() | |
Listener (Kind kind) | |
![]() | |
ListenerBase (Kind kind) | |
Definition at line 401 of file PatternMatch.h.
|
inline |
Definition at line 402 of file PatternMatch.h.
|
static |
Definition at line 222 of file PatternMatch.cpp.
References mlir::OpBuilder::ListenerBase::getKind(), and mlir::OpBuilder::ListenerBase::RewriterBaseListener.
|
inlinevirtual |
Notify the listener that the pattern failed to match the given operation, and provide a callback to populate a diagnostic with the reason why the failure occurred.
This method allows for derived listeners to optionally hook into the reason why a rewrite failed, and display it to users.
Reimplemented in mlir::ConversionPatternRewriter, mlir::RewriterBase::ForwardingListener, and mlir::transform::TrackingListener.
Definition at line 435 of file PatternMatch.h.
References mlir::failure().
|
inlinevirtual |
Notify the listener that the specified operation was modified in-place.
Reimplemented in mlir::RewriterBase::ForwardingListener.
Definition at line 406 of file PatternMatch.h.
|
inlinevirtual |
Notify the listener that the specified operation is about to be erased.
At this point, the operation has zero uses.
Reimplemented in mlir::RewriterBase::ForwardingListener.
Definition at line 427 of file PatternMatch.h.
|
inlinevirtual |
Notify the listener that the specified operation is about to be replaced with another operation.
This is called before the uses of the old operation have been changed.
By default, this function calls the "operation replaced with values" notification.
Reimplemented in mlir::RewriterBase::ForwardingListener.
Definition at line 414 of file PatternMatch.h.
|
inlinevirtual |
Notify the listener that the specified operation is about to be replaced with the a range of values, potentially produced by other operations.
This is called before the uses of the operation have been changed.
Reimplemented in mlir::RewriterBase::ForwardingListener.
Definition at line 422 of file PatternMatch.h.