[llvm-branch-commits] [mlir] [mlir][Transforms][NFC] Dialect conversion: Cache `UnresolvedMaterializationRewrite` (PR #108359)

Mehdi Amini via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Sep 12 03:52:42 PDT 2024


================
@@ -935,8 +909,10 @@ struct ConversionPatternRewriterImpl : public RewriterBase::Listener {
   /// to modify/access them is invalid rewriter API usage.
   SetVector<Operation *> replacedOps;
 
-  /// A set of all unresolved materializations.
-  DenseSet<Operation *> unresolvedMaterializations;
+  /// A mapping of all unresolved materializations (UnrealizedConversionCastOp)
+  /// to the corresponding rewrite objects.
+  DenseMap<Operation *, UnresolvedMaterializationRewrite *>
----------------
joker-eph wrote:

Can the key be directly `UnrealizedConversionCastOp` ?

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


More information about the llvm-branch-commits mailing list