@sameerds has implemented a replacement for the existing DivergenceAnalysis passes called “UniformityAnalysis”.
It is a generalization of divergence analysis that supports irreducible control flow, see: RFC: Uniformity Analysis for Irreducible Control Flow
Over the last month, we have replaced all in-tree users of DA/LegacyDA with UA with great success. No correctness issues were encountered at all, and neither LLVM or the AMDGPU backend depend on (Legacyt)DivergenceAnalysis anymore.
This is a proposal to deprecate both DA and LegacyDA, because:
- UA has all the same features as DA/LegacyDA.
- LegacyDA has incorrect corner cases, DA is correct but limited to reducible control flow. UA has neither of those issues.
- UA is generic and works with MIR as well.
There is no good reason left for downstream users to rely on DA/LegacyDA anymore.
- Deprecate LegacyDA/DA now:
- Remove LegacyDA/DA after LLVM 17.0.0 is released (branches).
- This gives downstream users a full release cycle (about 3 months IIRC) to make the switch to UA.
- Deprecate the
- Q: can this just be removed immediately or do we also need to deprecate?