MLIR
20.0.0git
|
Go to the source code of this file.
Classes | |
struct | MlirExternalPassCallbacks |
Structure of external MlirPass callbacks. More... | |
Macros | |
#define | DEFINE_C_API_STRUCT(name, storage) |
Typedefs | |
typedef struct MlirExternalPassCallbacks | MlirExternalPassCallbacks |
Functions | |
DEFINE_C_API_STRUCT (MlirPass, void) | |
DEFINE_C_API_STRUCT (MlirExternalPass, void) | |
DEFINE_C_API_STRUCT (MlirPassManager, void) | |
DEFINE_C_API_STRUCT (MlirOpPassManager, void) | |
MLIR_CAPI_EXPORTED MlirPassManager | mlirPassManagerCreate (MlirContext ctx) |
Create a new top-level PassManager with the default anchor. More... | |
MLIR_CAPI_EXPORTED MlirPassManager | mlirPassManagerCreateOnOperation (MlirContext ctx, MlirStringRef anchorOp) |
Create a new top-level PassManager anchored on anchorOp . More... | |
MLIR_CAPI_EXPORTED void | mlirPassManagerDestroy (MlirPassManager passManager) |
Destroy the provided PassManager. More... | |
static bool | mlirPassManagerIsNull (MlirPassManager passManager) |
Checks if a PassManager is null. More... | |
MLIR_CAPI_EXPORTED MlirOpPassManager | mlirPassManagerGetAsOpPassManager (MlirPassManager passManager) |
Cast a top-level PassManager to a generic OpPassManager. More... | |
MLIR_CAPI_EXPORTED MlirLogicalResult | mlirPassManagerRunOnOp (MlirPassManager passManager, MlirOperation op) |
Run the provided passManager on the given op . More... | |
MLIR_CAPI_EXPORTED void | mlirPassManagerEnableIRPrinting (MlirPassManager passManager, bool printBeforeAll, bool printAfterAll, bool printModuleScope, bool printAfterOnlyOnChange, bool printAfterOnlyOnFailure, MlirOpPrintingFlags flags, MlirStringRef treePrintingPath) |
Enable IR printing. More... | |
MLIR_CAPI_EXPORTED void | mlirPassManagerEnableVerifier (MlirPassManager passManager, bool enable) |
Enable / disable verify-each. More... | |
MLIR_CAPI_EXPORTED MlirOpPassManager | mlirPassManagerGetNestedUnder (MlirPassManager passManager, MlirStringRef operationName) |
Nest an OpPassManager under the top-level PassManager, the nested passmanager will only run on operations matching the provided name. More... | |
MLIR_CAPI_EXPORTED MlirOpPassManager | mlirOpPassManagerGetNestedUnder (MlirOpPassManager passManager, MlirStringRef operationName) |
Nest an OpPassManager under the provided OpPassManager, the nested passmanager will only run on operations matching the provided name. More... | |
MLIR_CAPI_EXPORTED void | mlirPassManagerAddOwnedPass (MlirPassManager passManager, MlirPass pass) |
Add a pass and transfer ownership to the provided top-level mlirPassManager. More... | |
MLIR_CAPI_EXPORTED void | mlirOpPassManagerAddOwnedPass (MlirOpPassManager passManager, MlirPass pass) |
Add a pass and transfer ownership to the provided mlirOpPassManager. More... | |
MLIR_CAPI_EXPORTED MlirLogicalResult | mlirOpPassManagerAddPipeline (MlirOpPassManager passManager, MlirStringRef pipelineElements, MlirStringCallback callback, void *userData) |
Parse a sequence of textual MLIR pass pipeline elements and add them to the provided OpPassManager. More... | |
MLIR_CAPI_EXPORTED void | mlirPrintPassPipeline (MlirOpPassManager passManager, MlirStringCallback callback, void *userData) |
Print a textual MLIR pass pipeline by sending chunks of the string representation and forwarding userData to callback`. More... | |
MLIR_CAPI_EXPORTED MlirLogicalResult | mlirParsePassPipeline (MlirOpPassManager passManager, MlirStringRef pipeline, MlirStringCallback callback, void *userData) |
Parse a textual MLIR pass pipeline and assign it to the provided OpPassManager. More... | |
MLIR_CAPI_EXPORTED MlirPass | mlirCreateExternalPass (MlirTypeID passID, MlirStringRef name, MlirStringRef argument, MlirStringRef description, MlirStringRef opName, intptr_t nDependentDialects, MlirDialectHandle *dependentDialects, MlirExternalPassCallbacks callbacks, void *userData) |
Creates an external MlirPass that calls the supplied callbacks using the supplied userData . More... | |
MLIR_CAPI_EXPORTED void | mlirExternalPassSignalFailure (MlirExternalPass pass) |
This signals that the pass has failed. More... | |
#define DEFINE_C_API_STRUCT | ( | name, | |
storage | |||
) |
typedef struct MlirExternalPassCallbacks MlirExternalPassCallbacks |
DEFINE_C_API_STRUCT | ( | MlirExternalPass | , |
void | |||
) |
DEFINE_C_API_STRUCT | ( | MlirOpPassManager | , |
void | |||
) |
DEFINE_C_API_STRUCT | ( | MlirPass | , |
void | |||
) |
DEFINE_C_API_STRUCT | ( | MlirPassManager | , |
void | |||
) |
MLIR_CAPI_EXPORTED MlirPass mlirCreateExternalPass | ( | MlirTypeID | passID, |
MlirStringRef | name, | ||
MlirStringRef | argument, | ||
MlirStringRef | description, | ||
MlirStringRef | opName, | ||
intptr_t | nDependentDialects, | ||
MlirDialectHandle * | dependentDialects, | ||
MlirExternalPassCallbacks | callbacks, | ||
void * | userData | ||
) |
Creates an external MlirPass
that calls the supplied callbacks
using the supplied userData
.
If opName
is empty, the pass is a generic operation pass. Otherwise it is an operation pass specific to the specified pass name.
Definition at line 196 of file Pass.cpp.
References MlirStringRef::length, unwrap(), and wrap().
MLIR_CAPI_EXPORTED void mlirExternalPassSignalFailure | ( | MlirExternalPass | pass | ) |
This signals that the pass has failed.
This is only valid to call during the run
callback of MlirExternalPassCallbacks
. See Pass::signalPassFailure().
Definition at line 211 of file Pass.cpp.
References unwrap().
MLIR_CAPI_EXPORTED void mlirOpPassManagerAddOwnedPass | ( | MlirOpPassManager | passManager, |
MlirPass | pass | ||
) |
MLIR_CAPI_EXPORTED MlirLogicalResult mlirOpPassManagerAddPipeline | ( | MlirOpPassManager | passManager, |
MlirStringRef | pipelineElements, | ||
MlirStringCallback | callback, | ||
void * | userData | ||
) |
Parse a sequence of textual MLIR pass pipeline elements and add them to the provided OpPassManager.
If parsing fails an error message is reported using the provided callback.
Definition at line 97 of file Pass.cpp.
References mlir::parsePassPipeline(), unwrap(), and wrap().
MLIR_CAPI_EXPORTED MlirOpPassManager mlirOpPassManagerGetNestedUnder | ( | MlirOpPassManager | passManager, |
MlirStringRef | operationName | ||
) |
MLIR_CAPI_EXPORTED MlirLogicalResult mlirParsePassPipeline | ( | MlirOpPassManager | passManager, |
MlirStringRef | pipeline, | ||
MlirStringCallback | callback, | ||
void * | userData | ||
) |
Parse a textual MLIR pass pipeline and assign it to the provided OpPassManager.
If parsing fails an error message is reported using the provided callback.
Definition at line 112 of file Pass.cpp.
References mlir::parsePassPipeline(), unwrap(), and wrap().
MLIR_CAPI_EXPORTED void mlirPassManagerAddOwnedPass | ( | MlirPassManager | passManager, |
MlirPass | pass | ||
) |
MLIR_CAPI_EXPORTED MlirPassManager mlirPassManagerCreate | ( | MlirContext | ctx | ) |
MLIR_CAPI_EXPORTED MlirPassManager mlirPassManagerCreateOnOperation | ( | MlirContext | ctx, |
MlirStringRef | anchorOp | ||
) |
MLIR_CAPI_EXPORTED void mlirPassManagerDestroy | ( | MlirPassManager | passManager | ) |
MLIR_CAPI_EXPORTED void mlirPassManagerEnableIRPrinting | ( | MlirPassManager | passManager, |
bool | printBeforeAll, | ||
bool | printAfterAll, | ||
bool | printModuleScope, | ||
bool | printAfterOnlyOnChange, | ||
bool | printAfterOnlyOnFailure, | ||
MlirOpPrintingFlags | flags, | ||
MlirStringRef | treePrintingPath | ||
) |
MLIR_CAPI_EXPORTED void mlirPassManagerEnableVerifier | ( | MlirPassManager | passManager, |
bool | enable | ||
) |
MLIR_CAPI_EXPORTED MlirOpPassManager mlirPassManagerGetAsOpPassManager | ( | MlirPassManager | passManager | ) |
MLIR_CAPI_EXPORTED MlirOpPassManager mlirPassManagerGetNestedUnder | ( | MlirPassManager | passManager, |
MlirStringRef | operationName | ||
) |
Nest an OpPassManager under the top-level PassManager, the nested passmanager will only run on operations matching the provided name.
The returned OpPassManager will be destroyed when the parent is destroyed. To further nest more OpPassManager under the newly returned one, see mlirOpPassManagerNest
below.
|
inlinestatic |
Checks if a PassManager is null.
Definition at line 65 of file Pass.h.
Referenced by pybind11::detail::type_caster< MlirPassManager >::load().
MLIR_CAPI_EXPORTED MlirLogicalResult mlirPassManagerRunOnOp | ( | MlirPassManager | passManager, |
MlirOperation | op | ||
) |
MLIR_CAPI_EXPORTED void mlirPrintPassPipeline | ( | MlirOpPassManager | passManager, |
MlirStringCallback | callback, | ||
void * | userData | ||
) |