nir/dead_cf: Stop relying on liveness analysis
authorJason Ekstrand <jason.ekstrand@intel.com>
Thu, 14 Feb 2019 03:42:39 +0000 (21:42 -0600)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 15 Feb 2019 05:06:29 +0000 (23:06 -0600)
commit08bfd710a25c14df5f690cce9604617536d7c560
tree4d01d9e101a855274e15405322d396d5a0cad719
parentb50465d1974a562cd1b5f889d6b9495002f81d91
nir/dead_cf: Stop relying on liveness analysis

The liveness analysis pass is fairly expensive because it has to build
large bit-sets and run a fix-point algorithm on them.  Instead of
requiring liveness for detecting if values escape a CF node, just take
advantage of the structured nature of NIR and use block indices instead.
This only requires the block index metadata which is the fastest we have
metadata to generate.

No shader-db changes on Kaby Lake

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/compiler/nir/nir_opt_dead_cf.c