nir: rework phi handling in divergence analysis
authorDaniel Schürmann <daniel@schuermann.dev>
Wed, 5 Feb 2020 12:08:27 +0000 (13:08 +0100)
committerMarge Bot <eric+marge@anholt.net>
Wed, 13 May 2020 18:49:22 +0000 (18:49 +0000)
commit450b1d87ba6bb41056f2ae8c576f98d6a70fa2e4
treee96be2f6eb404a50e607f32f73d706ebca004ae4
parentfebef2245965efb50e283b16d2a927fcaebd8ffc
nir: rework phi handling in divergence analysis

This patch splits the visit_phi() function into
three different ones according to the kind of phi
(merge-node, loop-header or loop-exit) and calls
them when visiting the cf_nodes.
This allows to revisit loops if the loop header's
phis have changed, only.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4062>
src/compiler/nir/nir_divergence_analysis.c