|
MLIR 24.0.0git
|
#include "mlir-c/Dialect/Transform.h"#include "mlir-c/Support.h"#include "mlir/CAPI/Dialect/Transform.h"#include "mlir/CAPI/Interfaces.h"#include "mlir/CAPI/Registration.h"#include "mlir/CAPI/Rewrite.h"#include "mlir/Dialect/Transform/IR/TransformDialect.h"#include "mlir/Dialect/Transform/IR/TransformTypes.h"#include "mlir/Dialect/Transform/Interfaces/TransformInterfaces.h"#include "llvm/ADT/TypeSwitch.h"Go to the source code of this file.
Classes | |
| class | TransformOpInterfaceFallbackModel |
| Fallback model for the TransformOpInterface that uses C API callbacks. More... | |
| class | PatternDescriptorOpInterfaceFallbackModel |
| Fallback model for the PatternDescriptorOpInterface that uses C API callbacks. More... | |
Functions | |
| MLIR_DEFINE_CAPI_DIALECT_REGISTRATION (Transform, transform, transform::TransformDialect) bool mlirTypeIsATransformAnyOpType(MlirType type) | |
| MlirTypeID | mlirTransformAnyOpTypeGetTypeID (void) |
| MlirType | mlirTransformAnyOpTypeGet (MlirContext ctx) |
| MlirStringRef | mlirTransformAnyOpTypeGetName (void) |
| bool | mlirTypeIsATransformAnyParamType (MlirType type) |
| MlirTypeID | mlirTransformAnyParamTypeGetTypeID (void) |
| MlirType | mlirTransformAnyParamTypeGet (MlirContext ctx) |
| MlirStringRef | mlirTransformAnyParamTypeGetName (void) |
| bool | mlirTypeIsATransformAnyValueType (MlirType type) |
| MlirTypeID | mlirTransformAnyValueTypeGetTypeID (void) |
| MlirType | mlirTransformAnyValueTypeGet (MlirContext ctx) |
| MlirStringRef | mlirTransformAnyValueTypeGetName (void) |
| bool | mlirTypeIsATransformOperationType (MlirType type) |
| MlirTypeID | mlirTransformOperationTypeGetTypeID (void) |
| MlirType | mlirTransformOperationTypeGet (MlirContext ctx, MlirStringRef operationName) |
| MlirStringRef | mlirTransformOperationTypeGetName (void) |
| MlirStringRef | mlirTransformOperationTypeGetOperationName (MlirType type) |
| bool | mlirTypeIsATransformParamType (MlirType type) |
| MlirTypeID | mlirTransformParamTypeGetTypeID (void) |
| MlirType | mlirTransformParamTypeGet (MlirContext ctx, MlirType type) |
| MlirStringRef | mlirTransformParamTypeGetName (void) |
| MlirType | mlirTransformParamTypeGetType (MlirType type) |
| MlirRewriterBase | mlirTransformRewriterAsBase (MlirTransformRewriter rewriter) |
| Casts a MlirTransformRewriter to a MlirRewriterBase. | |
| void | mlirTransformResultsSetOps (MlirTransformResults results, MlirValue result, intptr_t numOps, MlirOperation *ops) |
| Set the payload operations for a transform result by iterating over a list. | |
| void | mlirTransformResultsSetValues (MlirTransformResults results, MlirValue result, intptr_t numValues, MlirValue *values) |
| Set the payload values for a transform result by iterating over a list. | |
| void | mlirTransformResultsSetParams (MlirTransformResults results, MlirValue result, intptr_t numParams, MlirAttribute *params) |
| Set the parameters for a transform result by iterating over a list. | |
| void | mlirTransformStateForEachPayloadOp (MlirTransformState state, MlirValue value, MlirOperationCallback callback, void *userData) |
| Iterate over payload operations associated with the transform IR value. | |
| void | mlirTransformStateForEachPayloadValue (MlirTransformState state, MlirValue value, MlirValueCallback callback, void *userData) |
| Iterate over payload values associated with the transform IR value. | |
| void | mlirTransformStateForEachParam (MlirTransformState state, MlirValue value, MlirAttributeCallback callback, void *userData) |
| Iterate over parameters associated with the transform IR value. | |
| MlirTypeID | mlirTransformOpInterfaceTypeID (void) |
| Returns the interface TypeID of the TransformOpInterface. | |
| void | mlirTransformOpInterfaceAttachFallbackModel (MlirContext ctx, MlirStringRef opName, MlirTransformOpInterfaceCallbacks callbacks) |
| Attach a TransformOpInterface FallbackModel to the given named operation. | |
| MlirTypeID | mlirPatternDescriptorOpInterfaceTypeID (void) |
| Returns the interface TypeID of the PatternDescriptorOpInterface. | |
| void | mlirPatternDescriptorOpInterfaceAttachFallbackModel (MlirContext ctx, MlirStringRef opName, MlirPatternDescriptorOpInterfaceCallbacks callbacks) |
| Attach a PatternDescriptorOpInterface FallbackModel to the given named operation. | |
| static void | invokeMemoryEffectInstancesCallback (SmallVectorImpl< MemoryEffects::EffectInstance > &effects, MlirMemoryEffectInstancesCallback callback, void *userData) |
| void | mlirTransformOnlyReadsHandle (MlirOpOperand *operands, intptr_t numOperands, MlirMemoryEffectInstancesCallback callback, void *userData) |
| Set the effect for the operands to only read the transform handles. | |
| void | mlirTransformConsumesHandle (MlirOpOperand *operands, intptr_t numOperands, MlirMemoryEffectInstancesCallback callback, void *userData) |
| Set the effect for the operands to consuming the transform handles. | |
| void | mlirTransformProducesHandle (MlirValue *results, intptr_t numResults, MlirMemoryEffectInstancesCallback callback, void *userData) |
| Set the effect for the results to that they produce transform handles. | |
| void | mlirTransformModifiesPayload (MlirMemoryEffectInstancesCallback callback, void *userData) |
| Set the effect of potentially modifying payload IR. | |
| void | mlirTransformOnlyReadsPayload (MlirMemoryEffectInstancesCallback callback, void *userData) |
| Set the effect of potentially reading payload IR. | |
|
static |
Definition at line 388 of file Transform.cpp.
References wrap().
Referenced by mlirTransformConsumesHandle(), mlirTransformModifiesPayload(), mlirTransformOnlyReadsHandle(), mlirTransformOnlyReadsPayload(), and mlirTransformProducesHandle().
| MLIR_DEFINE_CAPI_DIALECT_REGISTRATION | ( | Transform | , |
| transform | , | ||
| transform::TransformDialect | ) |
Definition at line 22 of file Transform.cpp.
References unwrap().
| void mlirPatternDescriptorOpInterfaceAttachFallbackModel | ( | MlirContext | ctx, |
| MlirStringRef | opName, | ||
| MlirPatternDescriptorOpInterfaceCallbacks | callbacks ) |
Attach a PatternDescriptorOpInterface FallbackModel to the given named operation.
Attach PatternDescriptorOpInterface to the operation with the given name using the provided callbacks.
The FallbackModel uses the provided callbacks to implement the interface.
Definition at line 364 of file Transform.cpp.
References mlir::RegisteredOperationName::lookup(), PatternDescriptorOpInterfaceFallbackModel::setCallbacks(), and unwrap().
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::transform::PyPatternDescriptorOpInterface::attach().
| MlirTypeID mlirPatternDescriptorOpInterfaceTypeID | ( | void | ) |
Returns the interface TypeID of the PatternDescriptorOpInterface.
Definition at line 305 of file Transform.cpp.
References wrap().
| MlirType mlirTransformAnyOpTypeGet | ( | MlirContext | ctx | ) |
Definition at line 37 of file Transform.cpp.
References unwrap(), and wrap().
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::transform::AnyOpType::bindDerived().
| MlirStringRef mlirTransformAnyOpTypeGetName | ( | void | ) |
Definition at line 41 of file Transform.cpp.
References wrap().
| MlirTypeID mlirTransformAnyOpTypeGetTypeID | ( | void | ) |
Definition at line 33 of file Transform.cpp.
References wrap().
| MlirType mlirTransformAnyParamTypeGet | ( | MlirContext | ctx | ) |
Definition at line 57 of file Transform.cpp.
References unwrap(), and wrap().
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::transform::AnyParamType::bindDerived().
| MlirStringRef mlirTransformAnyParamTypeGetName | ( | void | ) |
Definition at line 61 of file Transform.cpp.
References wrap().
| MlirTypeID mlirTransformAnyParamTypeGetTypeID | ( | void | ) |
Definition at line 53 of file Transform.cpp.
References wrap().
| MlirType mlirTransformAnyValueTypeGet | ( | MlirContext | ctx | ) |
Definition at line 77 of file Transform.cpp.
References unwrap(), and wrap().
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::transform::AnyValueType::bindDerived().
| MlirStringRef mlirTransformAnyValueTypeGetName | ( | void | ) |
Definition at line 81 of file Transform.cpp.
References wrap().
| MlirTypeID mlirTransformAnyValueTypeGetTypeID | ( | void | ) |
Definition at line 73 of file Transform.cpp.
References wrap().
| void mlirTransformConsumesHandle | ( | MlirOpOperand * | operands, |
| intptr_t | numOperands, | ||
| MlirMemoryEffectInstancesCallback | callback, | ||
| void * | userData ) |
Set the effect for the operands to consuming the transform handles.
Invokes callback with ConsumesHandle effects corresponding to operands which have been marked as having those effects.
Definition at line 411 of file Transform.cpp.
References mlir::transform::consumesHandle(), invokeMemoryEffectInstancesCallback(), and unwrap().
| void mlirTransformModifiesPayload | ( | MlirMemoryEffectInstancesCallback | callback, |
| void * | userData ) |
Set the effect of potentially modifying payload IR.
Invokes callback with ModifiesPayload effects.
Definition at line 438 of file Transform.cpp.
References invokeMemoryEffectInstancesCallback(), and mlir::transform::modifiesPayload().
| void mlirTransformOnlyReadsHandle | ( | MlirOpOperand * | operands, |
| intptr_t | numOperands, | ||
| MlirMemoryEffectInstancesCallback | callback, | ||
| void * | userData ) |
Set the effect for the operands to only read the transform handles.
Invokes callback with OnlyReadsHandle effects corresponding to operands which have been marked as having those effects.
Definition at line 399 of file Transform.cpp.
References invokeMemoryEffectInstancesCallback(), mlir::transform::onlyReadsHandle(), and unwrap().
| void mlirTransformOnlyReadsPayload | ( | MlirMemoryEffectInstancesCallback | callback, |
| void * | userData ) |
Set the effect of potentially reading payload IR.
Invokes callback with OnlyReadsPayload effects.
Definition at line 446 of file Transform.cpp.
References invokeMemoryEffectInstancesCallback(), and mlir::transform::onlyReadsPayload().
| MlirType mlirTransformOperationTypeGet | ( | MlirContext | ctx, |
| MlirStringRef | operationName ) |
Definition at line 97 of file Transform.cpp.
References unwrap(), and wrap().
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::transform::OperationType::bindDerived().
| MlirStringRef mlirTransformOperationTypeGetName | ( | void | ) |
Definition at line 103 of file Transform.cpp.
References wrap().
| MlirStringRef mlirTransformOperationTypeGetOperationName | ( | MlirType | type | ) |
Definition at line 107 of file Transform.cpp.
References unwrap(), and wrap().
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::transform::OperationType::bindDerived().
| MlirTypeID mlirTransformOperationTypeGetTypeID | ( | void | ) |
Definition at line 93 of file Transform.cpp.
References wrap().
| void mlirTransformOpInterfaceAttachFallbackModel | ( | MlirContext | ctx, |
| MlirStringRef | opName, | ||
| MlirTransformOpInterfaceCallbacks | callbacks ) |
Attach a TransformOpInterface FallbackModel to the given named operation.
Attach TransformOpInterface to the operation with the given name using the provided callbacks.
The FallbackModel uses the provided callbacks to implement the interface.
Definition at line 281 of file Transform.cpp.
References mlir::RegisteredOperationName::lookup(), TransformOpInterfaceFallbackModel::setCallbacks(), and unwrap().
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::transform::PyTransformOpInterface::attach().
| MlirTypeID mlirTransformOpInterfaceTypeID | ( | void | ) |
Returns the interface TypeID of the TransformOpInterface.
Definition at line 210 of file Transform.cpp.
References wrap().
| MlirType mlirTransformParamTypeGet | ( | MlirContext | ctx, |
| MlirType | type ) |
Definition at line 123 of file Transform.cpp.
References unwrap(), and wrap().
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::transform::ParamType::bindDerived().
| MlirStringRef mlirTransformParamTypeGetName | ( | void | ) |
Definition at line 127 of file Transform.cpp.
References wrap().
| MlirType mlirTransformParamTypeGetType | ( | MlirType | type | ) |
Definition at line 131 of file Transform.cpp.
References mlir::getType(), unwrap(), and wrap().
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::transform::ParamType::bindDerived().
| MlirTypeID mlirTransformParamTypeGetTypeID | ( | void | ) |
Definition at line 119 of file Transform.cpp.
References wrap().
| void mlirTransformProducesHandle | ( | MlirValue * | results, |
| intptr_t | numResults, | ||
| MlirMemoryEffectInstancesCallback | callback, | ||
| void * | userData ) |
Set the effect for the results to that they produce transform handles.
Invokes callback with ProducesHandle effects corresponding to results which have been marked as having those effects.
Definition at line 423 of file Transform.cpp.
References invokeMemoryEffectInstancesCallback(), mlir::transform::producesHandle(), and unwrap().
| void mlirTransformResultsSetOps | ( | MlirTransformResults | results, |
| MlirValue | result, | ||
| intptr_t | numOps, | ||
| MlirOperation * | ops ) |
Set the payload operations for a transform result by iterating over a list.
Definition at line 150 of file Transform.cpp.
References result, and unwrap().
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::transform::PyTransformResults::setOps().
| void mlirTransformResultsSetParams | ( | MlirTransformResults | results, |
| MlirValue | result, | ||
| intptr_t | numParams, | ||
| MlirAttribute * | params ) |
Set the parameters for a transform result by iterating over a list.
Definition at line 169 of file Transform.cpp.
References result, and unwrap().
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::transform::PyTransformResults::setParams().
| void mlirTransformResultsSetValues | ( | MlirTransformResults | results, |
| MlirValue | result, | ||
| intptr_t | numValues, | ||
| MlirValue * | values ) |
Set the payload values for a transform result by iterating over a list.
Definition at line 159 of file Transform.cpp.
References result, and unwrap().
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::transform::PyTransformResults::setValues().
| MlirRewriterBase mlirTransformRewriterAsBase | ( | MlirTransformRewriter | rewriter | ) |
Casts a MlirTransformRewriter to a MlirRewriterBase.
Cast the TransformRewriter to a RewriterBase.
Definition at line 140 of file Transform.cpp.
References unwrap(), and wrap().
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::transform::PyTransformRewriter::PyTransformRewriter().
| void mlirTransformStateForEachParam | ( | MlirTransformState | state, |
| MlirValue | value, | ||
| MlirAttributeCallback | callback, | ||
| void * | userData ) |
Iterate over parameters associated with the transform IR value.
Calls the callback for each parameter.
Definition at line 199 of file Transform.cpp.
| void mlirTransformStateForEachPayloadOp | ( | MlirTransformState | state, |
| MlirValue | value, | ||
| MlirOperationCallback | callback, | ||
| void * | userData ) |
Iterate over payload operations associated with the transform IR value.
Calls the callback for each payload operation.
Definition at line 183 of file Transform.cpp.
| void mlirTransformStateForEachPayloadValue | ( | MlirTransformState | state, |
| MlirValue | value, | ||
| MlirValueCallback | callback, | ||
| void * | userData ) |
Iterate over payload values associated with the transform IR value.
Calls the callback for each payload value.
Definition at line 191 of file Transform.cpp.
| bool mlirTypeIsATransformAnyParamType | ( | MlirType | type | ) |
Definition at line 49 of file Transform.cpp.
References unwrap().
| bool mlirTypeIsATransformAnyValueType | ( | MlirType | type | ) |
Definition at line 69 of file Transform.cpp.
References unwrap().
| bool mlirTypeIsATransformOperationType | ( | MlirType | type | ) |
Definition at line 89 of file Transform.cpp.
References unwrap().
| bool mlirTypeIsATransformParamType | ( | MlirType | type | ) |
Definition at line 115 of file Transform.cpp.
References unwrap().