33 MlirTransformOptions transformOptions,
bool enable) {
34 unwrap(transformOptions)->enableExpensiveChecks(enable);
38 MlirTransformOptions transformOptions) {
39 return unwrap(transformOptions)->getExpensiveChecksEnabled();
43 MlirTransformOptions transformOptions,
bool enable) {
44 unwrap(transformOptions)->enableEnforceSingleToplevelTransformOp(enable);
48 MlirTransformOptions transformOptions) {
49 return unwrap(transformOptions)->getEnforceSingleToplevelTransformOp();
53 delete unwrap(transformOptions);
57 MlirOperation payload, MlirOperation transformRoot,
58 MlirOperation transformModule, MlirTransformOptions transformOptions) {
61 if (!isa<transform::TransformOpInterface>(transformRootOp)) {
63 <<
"must implement TransformOpInterface to be used as transform root";
66 if (!isa<ModuleOp>(transformModuleOp)) {
68 <<
"must be a " << ModuleOp::getOperationName();
73 cast<ModuleOp>(
unwrap(transformModule)), *
unwrap(transformOptions)));
77 MlirOperation other) {
80 unwrap(target), std::move(otherOwning));
#define DEFINE_C_API_PTR_METHODS(name, cpptype)
Operation is the basic unit of execution within MLIR.
InFlightDiagnostic emitError(const Twine &message={})
Emit an error about fatal conditions with this operation, reporting up to any diagnostic handlers tha...
This class acts as an owning reference to an op, and will automatically destroy the held op on destru...
mlir::Diagnostic & unwrap(MlirDiagnostic diagnostic)
MlirDiagnostic wrap(mlir::Diagnostic &diagnostic)
static MlirLogicalResult mlirLogicalResultFailure(void)
Creates a logical result representing a failure.
Include the generated interface declarations.
Operation * clone(OpBuilder &b, Operation *op, TypeRange newResultTypes, ValueRange newOperands)
A logical result value, essentially a boolean with named states.