[Mlir-commits] [mlir] [mlir][Transforms] Dialect conversion: Simplify handling of dropped arguments (PR #96207)
Markus Böck
llvmlistbot at llvm.org
Fri Jun 21 01:40:49 PDT 2024
================
@@ -330,34 +340,37 @@ class TypeConverter {
/// Register a materialization function, which must be convertible to the
/// following form:
- /// `Optional<Value> (OpBuilder &, T, ValueRange, Location)`,
- /// where `T` is any subclass of `Type`.
- /// This function is responsible for creating an operation, using the
- /// OpBuilder and Location provided, that "converts" a range of values into a
- /// single value of the given type `T`. It must return a Value of the
- /// converted type on success, an `std::nullopt` if it failed but other
- /// materialization can be attempted, and `nullptr` on unrecoverable failure.
- /// It will only be called for (sub)types of `T`.
+ /// `std::optional<Value>(OpBuilder &, T, ValueRange, Location)`,
+ /// where `T` is any subclass of `Type`. This function is responsible for
+ /// creating an operation, using the OpBuilder and Location provided, that
+ /// "casts" a range of values into a single value of the given type `T`. It
+ /// must return a Value of the converted type on success, an `std::nullopt` if
+ /// it failed but other materialization can be attempted, and `nullptr` on
+ /// unrecoverable failure. It will only be called for (sub)types of `T`.
+ /// Materialization functions must be provided when a type conversion may
+ /// persist after the conversion has finished.
///
/// This method registers a materialization that will be called when
- /// converting an illegal block argument type, to a legal type.
+ /// converting potentially multiple replacement block arguments (of a single
+ /// original block argument), to a single SSA value with a legal type.
----------------
zero9178 wrote:
```suggestion
/// converting block arguments that were the result of a single conversion of a block argument, to a single SSA value of a legal type.
```
Tried to made this sligthly easier to parse but not sure I succeeded
https://github.com/llvm/llvm-project/pull/96207
More information about the Mlir-commits
mailing list