[llvm] [Uniformity] Implement per-output machine uniformity analysis (PR #179275)

Sameer Sahasrabuddhe via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 3 01:02:20 PST 2026


https://github.com/ssahasra requested changes to this pull request.

I think this change misses the big picture. Until now, UA was asking the question "is this instruction uniform", which was a conservative approximation of "are all the defs of this instruction uniform". It seems this change wants to eliminate that approximation by only asking "is this def uniform". That would mean two changes:

1. Rename the enum `InstructionUniformity` to `ValueUniformity` and completely eliminate the notion of an instruction being uniform or not.
2. Terminators are a special case this concept. A branch of any kind is the only place where it is meaningful to ask "is this branch uniform". But even then, what we are really asking is "is the branch condition uniform", which is again a query on the uniformity of a value.

The current change stops half-way at creating this cleaner big picture. It should go all the way and eliminate instruction uniformity.

Also, the two tests are only about pseudo branches. Is there no other pure computation with multiple defs, where each def has a different uniformity?

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


More information about the llvm-commits mailing list