MLIR
19.0.0git

Trait implementing the TransformOpInterface for operations applying a transformation to a single operation handle and producing an arbitrary number of handles and parameter values. More...
#include "mlir/Dialect/Transform/IR/TransformInterfaces.h"
Public Member Functions  
DiagnosedSilenceableFailure  apply (transform::TransformRewriter &rewriter, TransformResults &transformResults, TransformState &state) 
Calls applyToOne for every payload operation associated with the operand of this transform IR op, the following case disjunction happens: More...  
Static Public Member Functions  
static LogicalResult  verifyTrait (Operation *op) 
Checks that the op matches the expectations of this trait. More...  
Additional Inherited Members  
Protected Member Functions inherited from mlir::OpTrait::TraitBase< OpTy, TransformEachOpTrait >  
Operation *  getOperation () 
Return the ultimate Operation being worked on. More...  
Trait implementing the TransformOpInterface for operations applying a transformation to a single operation handle and producing an arbitrary number of handles and parameter values.
The op must implement a method with the following signature:
applyToOne
, OpTy is either Operation* or a concrete payload IR Op class that the transformation is applied to (and NOT the class of the transform IR op). The applyToOne
method takes an empty results
vector that it fills with zero, one or multiple operations depending on the number of results expected by the transform op. The number of results must match the number of results of the transform op. applyToOne
is allowed to fill the results
with all null elements to signify that the transformation did not apply to the payload IR operations. Such null elements are filtered out from results before return.The transform op having this trait is expected to have a single operand.
Definition at line 1173 of file TransformInterfaces.h.
mlir::DiagnosedSilenceableFailure mlir::transform::TransformEachOpTrait< OpTy >::apply  (  transform::TransformRewriter &  rewriter, 
TransformResults &  transformResults,  
TransformState &  state  
) 
Calls applyToOne
for every payload operation associated with the operand of this transform IR op, the following case disjunction happens:
applyToOne
returns definiteFailure, the transformation is immediately considered definitely failed and we return.applyToOne
are checked to return a number of results expected by the transform IR op. If not, this is a definite failure and we return early.applyToOne
produces ops, associate them with the result of this transform op.applyToOne
return silenceableFailure, the transformation is considered silenceable.Definition at line 1511 of file TransformInterfaces.h.

static 
Checks that the op matches the expectations of this trait.
Definition at line 1567 of file TransformInterfaces.h.