[llvm-branch-commits] [mlir] [mlir][Transforms] Dialect conversion: Make materializations optional (PR #104668)
Markus Böck via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Aug 19 13:00:14 PDT 2024
================
@@ -2447,6 +2487,37 @@ LogicalResult OperationConverter::convertOperations(ArrayRef<Operation *> ops) {
} else {
rewriterImpl.applyRewrites();
}
+
+ // Gather all unresolved materializations.
+ SmallVector<UnrealizedConversionCastOp> allCastOps;
+ DenseMap<Operation *, UnresolvedMaterializationRewrite *> rewriteMap;
+ for (auto &rewrite : rewriterImpl.rewrites) {
----------------
zero9178 wrote:
```suggestion
for (std::unique_ptr<IRRewrite> &rewrite : rewriterImpl.rewrites) {
```
https://github.com/llvm/llvm-project/pull/104668
More information about the llvm-branch-commits
mailing list