nir/opt_if: Rework condition propagation
authorJason Ekstrand <jason.ekstrand@intel.com>
Sat, 20 Oct 2018 02:42:22 +0000 (21:42 -0500)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 26 Oct 2018 16:45:29 +0000 (11:45 -0500)
commita3b4cb34589e2f1a6898e88c8d9686cc3e133de3
treeeffd36592820b704e539237cc1fd8a55c2456278
parent4cd8a58595969e38254aeb0306b2408f80795700
nir/opt_if: Rework condition propagation

Instead of doing our own constant folding, we just emit instructions and
let constant folding happen.  This is substantially simpler and lets us
use the nir_imm_bool helper instead of dealing with the const_value's
ourselves.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/compiler/nir/nir_opt_if.c