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>
This commit is contained in:
Francisco Jerez
2018-06-11 12:54:17 -07:00
parent 51dc40cefb
commit 25dd67099d
5 changed files with 168 additions and 306 deletions

View File

@@ -37,7 +37,7 @@ libintel_compiler_files = files(
'brw_disasm.c',
'brw_disasm_info.c',
'brw_disasm_info.h',
'brw_eu.c',
'brw_eu.cpp',
'brw_eu_compact.c',
'brw_eu_defines.h',
'brw_eu_emit.c',