Skip to content

Commit c2e53b2

Browse files
[mlir][Transforms][NFC] Dialect conversion: Fix typo and improve docs (llvm#107539)
1 parent 77b388c commit c2e53b2

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

mlir/docs/DialectConversion.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,11 @@ class TypeConverter {
383383
};
384384
```
385385

386+
Materializations through the type converter are optional. If the
387+
`ConversionConfig::buildMaterializations` flag is set to "false", the dialect
388+
conversion driver builds an `unrealized_conversion_cast` op instead of calling
389+
the respective type converter callback whenever a materialization is required.
390+
386391
### Region Signature Conversion
387392

388393
From the perspective of type conversion, the types of block arguments are a bit

mlir/include/mlir/Transforms/DialectConversion.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1127,13 +1127,12 @@ struct ConversionConfig {
11271127

11281128
/// If set to "true", the dialect conversion attempts to build source/target/
11291129
/// argument materializations through the type converter API in lieu of
1130-
/// builtin.unrealized_conversion_cast ops. The conversion process fails if
1130+
/// "builtin.unrealized_conversion_cast ops". The conversion process fails if
11311131
/// at least one materialization could not be built.
11321132
///
1133-
/// If set to "false", the dialect conversion does not does not build any
1134-
/// custom materializations and instead inserts
1135-
/// builtin.unrealized_conversion_cast ops to ensure that the resulting IR
1136-
/// is valid.
1133+
/// If set to "false", the dialect conversion does not build any custom
1134+
/// materializations and instead inserts "builtin.unrealized_conversion_cast"
1135+
/// ops to ensure that the resulting IR is valid.
11371136
bool buildMaterializations = true;
11381137
};
11391138

0 commit comments

Comments
 (0)