[Mlir-commits] [mlir] [MLIR][LLVM] Improve module translation comment (NFC) (PR #94577)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Jun 5 22:48:47 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir-llvm
Author: Christian Ulmann (Dinistro)
<details>
<summary>Changes</summary>
This commit enhances the docsting of `translateModuleToLLVMIR` as a followup to https://github.com/llvm/llvm-project/pull/94445
---
Full diff: https://github.com/llvm/llvm-project/pull/94577.diff
1 Files Affected:
- (modified) mlir/include/mlir/Target/LLVMIR/Export.h (+5-4)
``````````diff
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",
``````````
</details>
https://github.com/llvm/llvm-project/pull/94577
More information about the Mlir-commits
mailing list