[llvm-branch-commits] [mlir] [mlir][Transforms] Dialect Conversion: Add `replaceOpWithMultiple` (PR #115816)

Matthias Springer via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Nov 12 20:46:24 PST 2024


matthias-springer wrote:

> One question I have here is why not just insert right before the operation that is being replaced? What is the need for trying to insert after one of the values? Wouldnt' that remove the need for all of this complexity? It gives you a singular place to insert.

Actually, I think you are right. I was thinking of a case where two ops (in different locations) were replaced with the same 1:N replacement values. And I thought that we store one mapping pair in that case. But we actually store one per original value (and not per replacement value). I just noticed this as I was trying to write down a counter-example...

Let me update the PR, I think this will simplify things quite a bit.

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


More information about the llvm-branch-commits mailing list