MLIR
22.0.0git
|
A listener that logs notification events to llvm::dbgs() before forwarding to the base listener. More...
#include "mlir/IR/PatternMatch.h"
Public Member Functions | |
PatternLoggingListener (OpBuilder::Listener *listener, StringRef patternName) | |
void | notifyOperationInserted (Operation *op, InsertPoint previous) override |
Notify the listener that the specified operation was inserted. More... | |
void | notifyOperationModified (Operation *op) override |
Notify the listener that the specified operation was modified in-place. More... | |
void | notifyOperationReplaced (Operation *op, Operation *newOp) override |
Notify the listener that all uses of the specified operation's results are about to be replaced with the results of another operation. More... | |
void | notifyOperationReplaced (Operation *op, ValueRange replacement) override |
Notify the listener that all uses of the specified operation's results are about to be replaced with the a range of values, potentially produced by other operations. More... | |
void | notifyOperationErased (Operation *op) override |
Notify the listener that the specified operation is about to be erased. More... | |
void | notifyPatternBegin (const Pattern &pattern, Operation *op) override |
Notify the listener that the specified pattern is about to be applied at the specified root operation. More... | |
![]() | |
ForwardingListener (OpBuilder::Listener *listener) | |
void | notifyBlockInserted (Block *block, Region *previous, Region::iterator previousIt) override |
Notify the listener that the specified block was inserted. More... | |
void | notifyBlockErased (Block *block) override |
Notify the listener that the specified block is about to be erased. More... | |
void | notifyPatternEnd (const Pattern &pattern, LogicalResult status) override |
Notify the listener that a pattern application finished with the specified status. More... | |
void | notifyMatchFailure (Location loc, function_ref< void(Diagnostic &)> reasonCallback) override |
Notify the listener that the pattern failed to match, and provide a callback to populate a diagnostic with the reason why the failure occurred. More... | |
![]() | |
Listener () | |
![]() | |
Listener () | |
virtual | ~Listener ()=default |
![]() | |
Kind | getKind () const |
Additional Inherited Members | |
![]() | |
enum class | Kind { OpBuilderListener = 0 , RewriterBaseListener = 1 } |
The kind of listener. More... | |
![]() | |
static bool | classof (const OpBuilder::Listener *base) |
![]() | |
Listener (Kind kind) | |
![]() | |
ListenerBase (Kind kind) | |
A listener that logs notification events to llvm::dbgs() before forwarding to the base listener.
Definition at line 480 of file PatternMatch.h.
|
inline |
Definition at line 481 of file PatternMatch.h.
|
overridevirtual |
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.
Reimplemented from mlir::RewriterBase::ForwardingListener.
Definition at line 36 of file PatternLoggingListener.cpp.
References mlir::Operation::getName(), and mlir::RewriterBase::ForwardingListener::notifyOperationErased().
|
overridevirtual |
Notify the listener that the specified operation was inserted.
previous
is the previous location of the op.previous
is empty.Note: Creating an (unlinked) op does not trigger this notification.
Reimplemented from mlir::RewriterBase::ForwardingListener.
Definition at line 8 of file PatternLoggingListener.cpp.
References mlir::Operation::getName(), and mlir::RewriterBase::ForwardingListener::notifyOperationInserted().
|
overridevirtual |
Notify the listener that the specified operation was modified in-place.
Reimplemented from mlir::RewriterBase::ForwardingListener.
Definition at line 15 of file PatternLoggingListener.cpp.
References mlir::Operation::getName(), and mlir::RewriterBase::ForwardingListener::notifyOperationModified().
|
overridevirtual |
Notify the listener that all uses of the specified operation's results are about to be replaced with the results of 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 from mlir::RewriterBase::ForwardingListener.
Definition at line 22 of file PatternLoggingListener.cpp.
References mlir::Operation::getName(), and mlir::RewriterBase::ForwardingListener::notifyOperationReplaced().
|
overridevirtual |
Notify the listener that all uses of the specified operation's results are 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 from mlir::RewriterBase::ForwardingListener.
Definition at line 29 of file PatternLoggingListener.cpp.
References mlir::Operation::getName(), and mlir::RewriterBase::ForwardingListener::notifyOperationReplaced().
|
overridevirtual |
Notify the listener that the specified pattern is about to be applied at the specified root operation.
Reimplemented from mlir::RewriterBase::ForwardingListener.
Definition at line 43 of file PatternLoggingListener.cpp.
References mlir::Operation::getName(), and mlir::RewriterBase::ForwardingListener::notifyPatternBegin().