MLIR  20.0.0git
Functions
TransformInterpreter.cpp File Reference
#include "mlir-c/Dialect/Transform/Interpreter.h"
#include "mlir-c/Support.h"
#include "mlir/CAPI/IR.h"
#include "mlir/CAPI/Support.h"
#include "mlir/CAPI/Wrap.h"
#include "mlir/Dialect/Transform/IR/Utils.h"
#include "mlir/Dialect/Transform/Interfaces/TransformInterfaces.h"
#include "mlir/Dialect/Transform/Transforms/TransformInterpreterUtils.h"

Go to the source code of this file.

Functions

MlirTransformOptions mlirTransformOptionsCreate ()
 Creates a default-initialized transform options object. More...
 
void mlirTransformOptionsEnableExpensiveChecks (MlirTransformOptions transformOptions, bool enable)
 Enables or disables expensive checks in transform options. More...
 
bool mlirTransformOptionsGetExpensiveChecksEnabled (MlirTransformOptions transformOptions)
 Returns true if expensive checks are enabled in transform options. More...
 
void mlirTransformOptionsEnforceSingleTopLevelTransformOp (MlirTransformOptions transformOptions, bool enable)
 Enables or disables the enforcement of the top-level transform op being single in transform options. More...
 
bool mlirTransformOptionsGetEnforceSingleTopLevelTransformOp (MlirTransformOptions transformOptions)
 Returns true if the enforcement of the top-level transform op being single is enabled in transform options. More...
 
void mlirTransformOptionsDestroy (MlirTransformOptions transformOptions)
 Destroys a transform options object previously created by mlirTransformOptionsCreate. More...
 
MlirLogicalResult mlirTransformApplyNamedSequence (MlirOperation payload, MlirOperation transformRoot, MlirOperation transformModule, MlirTransformOptions transformOptions)
 Applies the transformation script starting at the given transform root operation to the given payload operation. More...
 
MlirLogicalResult mlirMergeSymbolsIntoFromClone (MlirOperation target, MlirOperation other)
 Merge the symbols from other into target, potentially renaming them to avoid conflicts. More...
 

Function Documentation

◆ mlirMergeSymbolsIntoFromClone()

MlirLogicalResult mlirMergeSymbolsIntoFromClone ( MlirOperation  target,
MlirOperation  other 
)

Merge the symbols from other into target, potentially renaming them to avoid conflicts.

Private symbols may be renamed during the merge, public symbols must have at most one declaration. A name conflict in public symbols is reported as an error before returning a failure.

Note that this clones the other operation unlike the C++ counterpart that takes ownership.

Definition at line 76 of file TransformInterpreter.cpp.

References mlir::clone(), mlir::transform::detail::mergeSymbolsInto(), unwrap(), and wrap().

◆ mlirTransformApplyNamedSequence()

MlirLogicalResult mlirTransformApplyNamedSequence ( MlirOperation  payload,
MlirOperation  transformRoot,
MlirOperation  transformModule,
MlirTransformOptions  transformOptions 
)

Applies the transformation script starting at the given transform root operation to the given payload operation.

The module containing the transform root as well as the transform options should be provided. The transform operation must implement TransformOpInterface and the module must be a ModuleOp. Returns the status of the application.

Definition at line 56 of file TransformInterpreter.cpp.

References mlir::transform::applyTransformNamedSequence(), mlir::Operation::emitError(), mlirLogicalResultFailure(), unwrap(), and wrap().

◆ mlirTransformOptionsCreate()

MlirTransformOptions mlirTransformOptionsCreate ( void  )

Creates a default-initialized transform options object.

Definition at line 28 of file TransformInterpreter.cpp.

References wrap().

◆ mlirTransformOptionsDestroy()

void mlirTransformOptionsDestroy ( MlirTransformOptions  transformOptions)

Destroys a transform options object previously created by mlirTransformOptionsCreate.

Definition at line 52 of file TransformInterpreter.cpp.

References unwrap().

◆ mlirTransformOptionsEnableExpensiveChecks()

void mlirTransformOptionsEnableExpensiveChecks ( MlirTransformOptions  transformOptions,
bool  enable 
)

Enables or disables expensive checks in transform options.

Definition at line 32 of file TransformInterpreter.cpp.

References unwrap().

◆ mlirTransformOptionsEnforceSingleTopLevelTransformOp()

void mlirTransformOptionsEnforceSingleTopLevelTransformOp ( MlirTransformOptions  transformOptions,
bool  enable 
)

Enables or disables the enforcement of the top-level transform op being single in transform options.

Definition at line 42 of file TransformInterpreter.cpp.

References unwrap().

◆ mlirTransformOptionsGetEnforceSingleTopLevelTransformOp()

bool mlirTransformOptionsGetEnforceSingleTopLevelTransformOp ( MlirTransformOptions  transformOptions)

Returns true if the enforcement of the top-level transform op being single is enabled in transform options.

Definition at line 47 of file TransformInterpreter.cpp.

References unwrap().

◆ mlirTransformOptionsGetExpensiveChecksEnabled()

bool mlirTransformOptionsGetExpensiveChecksEnabled ( MlirTransformOptions  transformOptions)

Returns true if expensive checks are enabled in transform options.

Definition at line 37 of file TransformInterpreter.cpp.

References unwrap().