Skip to content

nir: refactor divergence analysis

This series refactors the divergence analysis in order to

  • make 'divergence' a property of ssa_def (by @jekstrand)
  • speed up the calculation w.r.t. phis

The speedup has no great impact, but bothered me since a while. Two things are done for this purpose:

  • handle phis when the corresponding cf_nodes are visited to short-cut loops
  • maintain a loop state to keep track of divergent break and continue statements

Merge request reports