MLIR
18.0.0git
|
A specialized listener that keeps track of cases in which no replacement payload could be found. More...
#include "mlir/Dialect/Transform/IR/TransformInterfaces.h"
Public Member Functions | |
~ErrorCheckingTrackingListener () override | |
DiagnosedSilenceableFailure | checkAndResetError () |
Check and return the current error state of this listener. More... | |
bool | failed () const |
Return "true" if this tracking listener had a failure. More... | |
![]() | |
TrackingListener (TransformState &state, TransformOpInterface op) | |
Create a new TrackingListener for usage in the specified transform op. More... | |
![]() | |
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... | |
![]() | |
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 |
![]() | |
virtual | ~Extension () |
Base virtual destructor. More... | |
Protected Member Functions | |
void | notifyPayloadReplacementNotFound (Operation *op, ValueRange values, DiagnosedSilenceableFailure &&diag) override |
This function is called when a tracked payload op is dropped because no replacement op was found. More... | |
![]() | |
virtual DiagnosedSilenceableFailure | findReplacementOp (Operation *&result, Operation *op, ValueRange newValues) const |
Return a replacement payload op for the given op, which is going to be replaced with the given values. More... | |
LogicalResult | notifyMatchFailure (Location loc, function_ref< void(Diagnostic &)> reasonCallback) override |
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... | |
TransformOpInterface | getTransformOp () const |
Return the transform op in which this TrackingListener is used. More... | |
![]() | |
Listener (Kind kind) | |
![]() | |
ListenerBase (Kind kind) | |
![]() | |
Extension (TransformState &state) | |
Constructs an extension of the given TransformState object. More... | |
const TransformState & | getTransformState () const |
Provides read-only access to the parent TransformState object. More... | |
LogicalResult | replacePayloadOp (Operation *op, Operation *replacement) |
Replaces the given payload op with another op. More... | |
LogicalResult | replacePayloadValue (Value value, Value replacement) |
Replaces the given payload value with another value. More... | |
Additional Inherited Members | |
![]() | |
enum class | Kind { OpBuilderListener = 0 , RewriterBaseListener = 1 } |
The kind of listener. More... | |
![]() | |
static bool | classof (const OpBuilder::Listener *base) |
![]() | |
static Operation * | getCommonDefiningOp (ValueRange values) |
Return the single op that defines all given values (if any). More... | |
A specialized listener that keeps track of cases in which no replacement payload could be found.
The error state of this listener must be checked before the end of its lifetime.
Definition at line 1023 of file TransformInterfaces.h.
|
override |
Definition at line 1334 of file TransformInterfaces.cpp.
DiagnosedSilenceableFailure transform::ErrorCheckingTrackingListener::checkAndResetError | ( | ) |
Check and return the current error state of this listener.
Afterwards, resets the error state to "success".
Definition at line 1342 of file TransformInterfaces.cpp.
References mlir::DiagnosedSilenceableFailure::success().
bool transform::ErrorCheckingTrackingListener::failed | ( | ) | const |
Return "true" if this tracking listener had a failure.
Definition at line 1349 of file TransformInterfaces.cpp.
|
overrideprotectedvirtual |
This function is called when a tracked payload op is dropped because no replacement op was found.
Derived classes can implement this function for custom error handling.
Reimplemented from mlir::transform::TrackingListener.
Definition at line 1353 of file TransformInterfaces.cpp.