nir/search: Fold src_is_bool()/alu_instr_is_bool() into src_is_type().
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 17 Aug 2016 22:02:59 +0000 (15:02 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 18 Aug 2016 08:27:15 +0000 (01:27 -0700)
commite8543feba790b68edfcacc9554967118029b88f8
tree2cdf51995c65d144eb4c7efd325bc7d058b723d5
parent241870fe5b91c6efaa77a68dc9ed4a335dc76650
nir/search: Fold src_is_bool()/alu_instr_is_bool() into src_is_type().

I don't want src_is_bool() and src_is_type(x, nir_type_bool) to behave
differently.  Having the logic spread out over three functions makes it
harder to decide where to put new logic, as well.

So, combine them all.  It's a bit simpler because there's now only one
recursive function rather than a pair of mutually recursive functions.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/nir/nir_search.c