[Mlir-commits] [mlir] [MLIR][LLVM] Improve module translation comment (NFC) (PR #94577)
Christian Ulmann
llvmlistbot at llvm.org
Wed Jun 5 22:48:16 PDT 2024
https://github.com/Dinistro created https://github.com/llvm/llvm-project/pull/94577
This commit enhances the docsting of `translateModuleToLLVMIR` as a followup to https://github.com/llvm/llvm-project/pull/94445
>From 9eb137eef9ce4b70f011d43e61598ca710b77d8c Mon Sep 17 00:00:00 2001
From: Christian Ulmann <christian.ulmann at nextsilicon.com>
Date: Thu, 6 Jun 2024 05:46:33 +0000
Subject: [PATCH] [MLIR][LLVM] Improve module translation comment (NFC)
This commit enhances the docsting of `translateModuleToLLVMIR` as a
followup to https://github.com/llvm/llvm-project/pull/94445
---
mlir/include/mlir/Target/LLVMIR/Export.h | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/mlir/include/mlir/Target/LLVMIR/Export.h b/mlir/include/mlir/Target/LLVMIR/Export.h
index 2244968655138..893aaaa4faff6 100644
--- a/mlir/include/mlir/Target/LLVMIR/Export.h
+++ b/mlir/include/mlir/Target/LLVMIR/Export.h
@@ -20,10 +20,11 @@ class Module;
namespace mlir {
class Operation;
-/// Translate operation that satisfies LLVM dialect module requirements into an
-/// LLVM IR module living in the given context. This translates operations from
-/// any dilalect that has a registered implementation of
-/// LLVMTranslationDialectInterface.
+/// Translates a given LLVM dialect `module` into an LLVM IR module living in
+/// the given context. Operates on any operation from dialects that provide a
+/// registered implementation of the LLVMTranslationDialectInterface. Returns
+/// nullptr when the translation fails.
+/// Verifies the produced LLVM module, except when `disableVerification` is set.
std::unique_ptr<llvm::Module>
translateModuleToLLVMIR(Operation *module, llvm::LLVMContext &llvmContext,
llvm::StringRef name = "LLVMDialectModule",
More information about the Mlir-commits
mailing list