[Mlir-commits] [llvm] [mlir] [mlir] Add uniformity analysis and InferUniformityOpInterface (PR #220740)

Alessandro Potenza llvmlistbot at llvm.org
Wed Sep 2 14:48:33 PDT 2026


alepot55 wrote:

Two things I would like an opinion on before this goes further.

The transparent dialects are a hardcoded list of core dialects passed to the
constructor. It is the part I am least happy with: an operation of a dialect
outside the list defines divergent values even when it is plain arithmetic. A
dialect interface would fix it. Is that worth doing now, or is the list fine
until someone hits it?

And does the interface belong in mlir/Interfaces next to InferIntRangeInterface,
where it is, or under the GPU dialect? The analysis is in Analysis/DataFlow
either way.

On the select inside an scf.if from #157743: with every operand of the select
uniform, its value comes out uniform and its execution comes out divergent,
while the result of the enclosing scf.if comes out divergent because the two
branches disagree. "Uniform at definition and all lanes active at definition"
is two separate queries here, one on the value and one on the control flow
around it, and both are computed.


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


More information about the Mlir-commits mailing list