[Mlir-commits] [mlir] [MLIR][SCF] Actually use conversion interface in scf-to-cf conversion (PR #154075)
Matthias Springer
llvmlistbot at llvm.org
Mon Aug 18 05:02:11 PDT 2025
matthias-springer wrote:
Looking at your stack trace:
```
#2 0x000060fc32746bb7 in mlir::Value::dropAllUses (this=0x7fff2968b3b0) at external/llvm-project/mlir/include/mlir/IR/Value.h:144
#3 0x000060fc32746d84 in mlir::Operation::dropAllUses (this=0x60fc473b1c30) at external/llvm-project/mlir/include/mlir/IR/Operation.h:836
#4 0x000060fc35db9083 in (anonymous namespace)::CreateOperationRewrite::rollback (this=0x60fc473bc590)
```
One possible scenario where the rollback of an operation created could introduce a NULL value:
1. Pattern `A` creates a new operation `X`.
2. Pattern (possibly another one) calls `rewriter.replaceAllUsesWith(..., X.getResult())`.
3. `A` is rolled back.
The problem is this example is that `replaceAllUsesWith` is not supported in a dialect conversion. (But the API surface still exposes it.) The conversion driver (`allowPatternRollback = false`) adds some preliminary support, but more work is still needed...
https://github.com/llvm/llvm-project/pull/154075
More information about the Mlir-commits
mailing list