nir: Rename commutative to 2src_commutative
authorIan Romanick <ian.d.romanick@intel.com>
Thu, 9 May 2019 22:27:14 +0000 (15:27 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Tue, 14 May 2019 18:25:02 +0000 (11:25 -0700)
commitede45bf9cfe20578712ae874f7a3d18fd86a1297
tree5833f557c30d35fb5273a53648abefad0544120b
parente99081e76d4a0bba51ddaf87bc8cfb382cb4a448
nir: Rename commutative to 2src_commutative

The meaning of the new name is that the first two sources are
commutative.  Since this is only currently applied to two-source
operations, there is no change.

A future change will mark ffma as 2src_commutative.

It is also possible that future work will add 3src_commutative for
opcodes like fmin3.

v2: s/commutative_2src/2src_commutative/g.  I had originally considered
this, but I discarded it because I did't want to deal with identifiers
that (should) start with 2.  Jason suggested it in review, so we decided
that _2src_commutative would be used in nir_opcodes.py.  Also add some
comments documenting what 2src_commutative means.  Also suggested by
Jason.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/nir/nir.h
src/compiler/nir/nir_algebraic.py
src/compiler/nir/nir_instr_set.c
src/compiler/nir/nir_opcodes.py