[Mlir-commits] [mlir] [mlir][XeVM] Use libocloc API for binary generation. (PR #188353)

Md Abdullah Shahneous Bari llvmlistbot at llvm.org
Thu Apr 9 12:53:48 PDT 2026


================
@@ -54,6 +54,18 @@ class SerializeGPUModuleBase : public LLVM::ModuleToObject {
   /// Returns the path to the tool used for serialization.
   std::optional<std::string> findTool(StringRef tool);
 
+  /// Compiles to native code using the `ocloc` command-line tool, communicating
+  /// through temporary files.
+  FailureOr<SmallVector<char, 0>>
+  compileToBinaryViaOclocTool(StringRef asmStr, StringRef inputFormat);
+
+  /// Compiles to native code using the `ocloc` shared library API, in-process,
+  /// without temporary files. Only available when the library is linked in.
+#if MLIR_XEVM_OCLOC_AVAILABLE
----------------
mshahneo wrote:

Thanks a lot, good suggestion, changed it to `MLIR_XEVM_OCLOC_LIB_AVAILABLE `.

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


More information about the Mlir-commits mailing list