[Mlir-commits] [mlir] [mlir][Transforms][NFC] Dialect conversion: Fix typo and improve docs (PR #107539)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Fri Sep 6 00:56:12 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir-core
Author: Matthias Springer (matthias-springer)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/107539.diff
2 Files Affected:
- (modified) mlir/docs/DialectConversion.md (+5)
- (modified) mlir/include/mlir/Transforms/DialectConversion.h (+3-4)
``````````diff
diff --git a/mlir/docs/DialectConversion.md b/mlir/docs/DialectConversion.md
index 23e74470a835f7..4f6cb1dec66a63 100644
--- a/mlir/docs/DialectConversion.md
+++ b/mlir/docs/DialectConversion.md
@@ -383,6 +383,11 @@ class TypeConverter {
};
```
+Materializations through the type converter are optional. If the
+`ConversionConfig::buildMaterializations` flag is set to "false", the dialect
+conversion driver builds an `unrealized_conversion_cast` op instead of calling
+the respective type converter callback whenever a materialization is required.
+
### Region Signature Conversion
From the perspective of type conversion, the types of block arguments are a bit
diff --git a/mlir/include/mlir/Transforms/DialectConversion.h b/mlir/include/mlir/Transforms/DialectConversion.h
index 5f680e8eca7559..f4ff42fbe4d1fe 100644
--- a/mlir/include/mlir/Transforms/DialectConversion.h
+++ b/mlir/include/mlir/Transforms/DialectConversion.h
@@ -1130,10 +1130,9 @@ struct ConversionConfig {
/// builtin.unrealized_conversion_cast ops. The conversion process fails if
/// at least one materialization could not be built.
///
- /// If set to "false", the dialect conversion does not does not build any
- /// custom materializations and instead inserts
- /// builtin.unrealized_conversion_cast ops to ensure that the resulting IR
- /// is valid.
+ /// If set to "false", the dialect conversion does not build any custom
+ /// materializations and instead inserts builtin.unrealized_conversion_cast
+ /// ops to ensure that the resulting IR is valid.
bool buildMaterializations = true;
};
``````````
</details>
https://github.com/llvm/llvm-project/pull/107539
More information about the Mlir-commits
mailing list