nir: Allow nir_ssa_alu_instr_src_components to operate on non-SSA destinations
authorIan Romanick <ian.d.romanick@intel.com>
Fri, 7 Jun 2019 15:35:51 +0000 (08:35 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 8 Jul 2019 18:30:11 +0000 (11:30 -0700)
commit5450fd7a36469216ee0e075ed62f3d861e1bd2fa
tree8644679fcbd55297cd0c550e66970600aecbae94
parent12217de08cb1fd3dcedcaacb8757ee2f26fc3002
nir: Allow nir_ssa_alu_instr_src_components to operate on non-SSA destinations

Existing users only operate on instructions with SSA destinations.  Some
later patches add new direct calls and indirect calls (via existing NIR
functions) on instructions after going out of SSA.  At the very least,
these calls are added by:

intel/vec4: Try to emit a VF source in try_immediate_source
intel/vec4: Try to emit a single load for multiple 3-src instruction operands

The first commit adds direct calls, and the second adds calls via
nir_alu_srcs_equal and nir_alu_srcs_negative_equal.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/compiler/nir/nir.h