RegionBranchOp interface has provided a way to trace control flow between operation’s body region, which has widely used in dataflow framework, alias analysis and bufferization.
It seems strange to me that scf.forall/parallel op doesn’t have RegionBranchOp interface, which will cause analysis error(such as reaching definition analysis based on dense dataflow analysis).
Probably nobody needed it so far, so the interface was never implemented. Both ops should have it. However, note that the interface will not be as “useful” as for example on scf.for. The RegionBranchOpInterface implementation cannot model the fact that multiple loop iterations are running in parallel (or that there are multiple iterations at all). It will look like implementation of scf.execute_region.
One caveat: Both ops have special terminators that describe how the result value of the loop is constructed. So the “value propagation” aspect of the interface cannot be modeled.
It seems “value propagation” cannot disable unless we modify all pass that use RegionBranchOpInterface.
For example, scf.forall will failed in sparse dataflow analysis. interface method ‘getSuccessorRegions’ implementation is hard to choose:
If return opeand values in ‘tensor.parallel_insert’, this will get a fault analysis state. e.g. the analysis state indicates all element in tensor have same value.