[Mlir-commits] [mlir] [mlir][Transforms] Dialect conversion: add `originalType` param to materializations (PR #112128)

Matthias Springer llvmlistbot at llvm.org
Sun Oct 13 05:08:03 PDT 2024


================
@@ -303,20 +323,22 @@ class TypeConverter {
   /// `add*Materialization` for more information on the context for these
   /// methods.
   Value materializeArgumentConversion(OpBuilder &builder, Location loc,
-                                      Type resultType,
-                                      ValueRange inputs) const {
+                                      Type resultType, ValueRange inputs,
+                                      Type originalType) const {
     return materializeConversion(argumentMaterializations, builder, loc,
-                                 resultType, inputs);
+                                 resultType, inputs, originalType);
   }
   Value materializeSourceConversion(OpBuilder &builder, Location loc,
-                                    Type resultType, ValueRange inputs) const {
+                                    Type resultType, ValueRange inputs,
+                                    Type originalType) const {
     return materializeConversion(sourceMaterializations, builder, loc,
-                                 resultType, inputs);
+                                 resultType, inputs, originalType);
   }
----------------
matthias-springer wrote:

Good idea, the PR became much smaller and no change is needed to existing code.

https://github.com/llvm/llvm-project/pull/112128


More information about the Mlir-commits mailing list