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

Artem Kroviakov llvmlistbot at llvm.org
Tue Apr 7 00:51:40 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
----------------
akroviakov wrote:

Maybe change to `MLIR_XEVM_OCLOC_LIB_AVAILABLE` as there are now two ocloc paths.

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


More information about the Mlir-commits mailing list