intel/eu: Rework opcode description tables to allow efficient look-up by either HW...
authorFrancisco Jerez <currojerez@riseup.net>
Mon, 11 Jun 2018 19:54:17 +0000 (12:54 -0700)
committerFrancisco Jerez <currojerez@riseup.net>
Fri, 11 Oct 2019 19:24:16 +0000 (12:24 -0700)
commit25dd67099df301f09ce40b8f9c5a3bbc857e367c
tree857fbb0010ea87f081ac5e42b2dce90f2b87ad73
parent51dc40cefb0b04726668bb3f3ee0e51cdaf30d72
intel/eu: Rework opcode description tables to allow efficient look-up by either HW or IR opcode.

This rewrites the current opcode description tables as a more compact
flat data structure.  The purpose is to allow efficient constant-time
look-up by either HW or IR opcode, which will allow us to drop the
hard-coded correspondence between HW and IR opcodes -- See the next
commits for the rationale.

brw_eu.c is now built as C++ source so we can take advantage of
pointers to member in order to make the look-up function work
regardless of the opcode_desc member used as look-up key.

v2: Optimize devinfo struct comparison (Caio)

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/intel/Makefile.sources
src/intel/compiler/brw_eu.c [deleted file]
src/intel/compiler/brw_eu.cpp [new file with mode: 0644]
src/intel/compiler/brw_eu.h
src/intel/compiler/brw_eu_defines.h
src/intel/compiler/meson.build