[Mlir-commits] [mlir] [mlir][Transforms] Dialect conversion: Context-aware type conversions (PR #140434)

Markus Böck llvmlistbot at llvm.org
Sun May 18 02:13:43 PDT 2025


================
@@ -328,7 +361,7 @@ class TypeConverter {
   /// types is empty, the type is removed and any usages of the existing value
   /// are expected to be removed during conversion.
   using ConversionCallbackFn = std::function<std::optional<LogicalResult>(
-      Type, SmallVectorImpl<Type> &)>;
+      std::variant<Type, Value>, SmallVectorImpl<Type> &)>;
----------------
zero9178 wrote:

```suggestion
      PointerUnion<Type, Value>, SmallVectorImpl<Type> &)>;
```
PointerUnion has less storage overhead and a more familiar API for LLVM developers

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


More information about the Mlir-commits mailing list