[Mlir-commits] [mlir] [MLIR] Add C-API for parsing bytecode (PR #83825)
Matteo Franciolini
llvmlistbot at llvm.org
Mon Mar 4 08:13:40 PST 2024
================
@@ -820,6 +831,16 @@ MLIR_CAPI_EXPORTED MlirOperation mlirBlockGetTerminator(MlirBlock block);
MLIR_CAPI_EXPORTED void mlirBlockAppendOwnedOperation(MlirBlock block,
MlirOperation operation);
+/// Read the operations defined within the given buffer, containing MLIR
+/// bytecode, into the provided block.
+MLIR_CAPI_EXPORTED MlirLogicalResult mlirBlockAppendParseBytecode(
+ MlirContext context, MlirBlock block, MlirStringRef buffer);
+
+/// Same as mlirBlockAppendParseBytecode but with reader config.
+MLIR_CAPI_EXPORTED MlirLogicalResult mlirBlockAppendParseBytecodeWithConfig(
----------------
mfrancio wrote:
right now, the only functionality that the BytecodeReaderConfig exposes is the capability of injecting callbacks. In that, i am missing from the patch how the callbacks can be attached through the C-API.
https://github.com/llvm/llvm-project/pull/83825
More information about the Mlir-commits
mailing list