Babak ba55ef32ef
[mlir][IR] Fix RewriterBase::replaceUsesWithIf(ValueRange) in dialect conversion (#172883)
`ConversionPatternRewriter::replaceUsesWithIf` does not support the
`allUsesReplaced` flag and asserts that it's not set. However the
`ValueRange` overload of `RewriterBase::replaceUsesWithIf` always passes
this flag when calling the virtual overload of `replaceUsesWithIf`. This
means calls made to `RewriterBase::replaceUsesWithIf` from a
`ConversionPattern` crash, whether the `allUsesReplaced` flag is set or
not.

This change tweaks `RewriterBase::replaceUsesWithIf` to only pass that
flag if the callee has set it.
2025-12-19 17:19:37 +01:00
..

Multi-Level Intermediate Representation

See https://mlir.llvm.org/ for more information.