[Mlir-commits] [mlir] [mlir][scf] fix getSuccessorRegions func in scf.forall (PR #147491)
donald chen
llvmlistbot at llvm.org
Tue Jul 8 04:53:53 PDT 2025
cxy-1993 wrote:
> Is this stemming from some real use case or bug?
>
> The control flow interfaces are not modeling parallelism currently, and this is a bit tricky. In particular, control flow interfaces are used by dataflow analyses to understand whether a block may be executed before or after another block, including a different "instance" of the same block. This may be the case here. I'd like to better think through this before we decide one way or another.
We're using dataflow analysis on a very large program, and the compilation time is excessively long because scf.forall assumes the body may execute after body.
The current implementation doesn't cause functional issues, but it's conservative, increasing compilation time and potentially making the analysis overly cautious. The forall semantic is meant to indicate parallel execution across multiple threads, so for a single thread, it's more reasonable for the forall body to exit after execution (similar to an outlined gpu program).
https://github.com/llvm/llvm-project/pull/147491
More information about the Mlir-commits
mailing list