Uniformity analysis is a generalization of divergence analysis to
include irreducible control flow:
- The proposed spec presents a notion of "maximal convergence" that captures the existing convention of converging threads at the headers of natual loops.
- Maximal convergence is then extended to irreducible cycles. The identity of irreducible cycles is determined by the choices made in a depth-first traversal of the control flow graph. Uniformity analysis uses criteria that depend only on closed paths and not cycles, to determine maximal convergence. This makes it a conservative analysis that is independent of the effect of DFS on CycleInfo.
- The analysis is implemented as a template that can be instantiated for both LLVM IR and Machine IR.
Current status:
- passes existing tests for divergence analysis
- passes new tests with irreducible control flow
- currently working on Machine IR tests
Based on concepts originally outlined by
Nicolai Haehnle <nicolai.haehnle@amd.com>
With contributions from Ruiling Song <ruiling.song@amd.com> and
Jay Foad <jay.foad@amd.com>.
Used only in LLVM_DEBUG.