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

Mehdi Amini llvmlistbot at llvm.org
Mon Mar 4 15:16:21 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);
----------------
joker-eph wrote:

Just checking, but you know that the existing parsing mechanism can already load a bytecode buffer right? (`mlirOperationCreateParse` for example)

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


More information about the Mlir-commits mailing list