[Mlir-commits] [mlir] [MLIR] Fix computeTiedSuccessorInputs for single-iteration scf.for (PR #188986)

Matthias Springer llvmlistbot at llvm.org
Thu Apr 9 02:47:58 PDT 2026


matthias-springer wrote:

The API surface could be quite large. E.g., what if you want to change the type of an SSA value? Is that something we'd like to support through the interface?

I see two approaches:
1. Provide a rich API for modifying an operation (e.g., `RegionBranchOpInterface::removeValue`).
2. The interface is read-only. There is no API for modifying IR. But it allows you to query all information necessary to modify IR in a safe way. I.e., the `includeRuntimeUnreachableRegions` approach. Another way to think about this: `RegionBranchOpInterface::getSuccessorRegions` currently queries data flow. What's missing is information about structural validity of the op.

If possible, I'd prefer the second approach, as it would keep the op interface small. Everything else can be helper function built around it.


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


More information about the Mlir-commits mailing list