MLIR
16.0.0git
|
This struct provides a convenient way to determine how to process a given type as either a PDL parameter, or a result value. More...
#include "mlir/IR/PatternMatch.h"
This struct provides a convenient way to determine how to process a given type as either a PDL parameter, or a result value.
This allows for supporting complex types in constraint and rewrite functions, without requiring the user to hand-write the necessary glue code themselves. Specializations of this class should implement the following methods to enable support as a PDL argument or result type:
static LogicalResult verifyAsArg( function_ref<LogicalResult(const Twine &)> errorFn, PDLValue pdlValue, size_t argIdx);
T
.static T processAsArg(PDLValue pdlValue);
T
.static void processAsResult(PatternRewriter &, PDLResultList &results, const T &value);
T
as the result of a function invocation. The method should package the value into an appropriate form and append it to the given result list.If the type T
is based on a higher order value, consider using ProcessPDLValueBasedOn
as a base class of the specialization to simplify the implementation.
Definition at line 863 of file PatternMatch.h.