[Mlir-commits] [mlir] [MLIR] Add C-API for parsing bytecode (PR #83825)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Mon Mar 4 09:41:08 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(
----------------
SpriteOvO wrote:

Attaching callbacks would involve more C API type wrapping, and I'd like to leave that work for future PRs.

https://github.com/llvm/llvm-project/pull/83825


More information about the Mlir-commits mailing list