[Mesa-dev] [PATCH 20/23] intel/eu: Rework opcode description tables to allow efficient look-up by either HW or IR opcode.
Caio Marcelo de Oliveira Filho
caio.oliveira at intel.com
Mon Jul 2 21:46:43 UTC 2018
> diff --git a/src/intel/Makefile.tools.am b/src/intel/Makefile.tools.am
> index b00cc8cc2cb..4f2027cdfd6 100644
> --- a/src/intel/Makefile.tools.am
> +++ b/src/intel/Makefile.tools.am
> @@ -27,6 +27,8 @@ tools_aubinator_SOURCES = \
> tools/aubinator.c \
> tools/intel_aub.h
>
> +nodist_EXTRA_tools_aubinator_SOURCES = dummy.cpp
> +
> tools_aubinator_CFLAGS = \
> $(AM_CFLAGS) \
> $(ZLIB_CFLAGS)
> @@ -47,6 +49,8 @@ tools_aubinator_LDADD = \
> tools_aubinator_error_decode_SOURCES = \
> tools/aubinator_error_decode.c
>
> +nodist_EXTRA_tools_aubinator_error_decode_SOURCES = dummy.cpp
> +
> tools_aubinator_error_decode_LDADD = \
> common/libintel_common.la \
> compiler/libintel_compiler.la \
This hunk seems to be here by accident.
> +static const opcode_desc *
> +lookup_opcode_desc(gen_device_info *index_devinfo,
> + const opcode_desc **index_descs,
> + unsigned index_size,
> + unsigned opcode_desc::*key,
> + const gen_device_info *devinfo,
> + unsigned k)
> {
> - if (opcode >= ARRAY_SIZE(opcode_descs))
> - return NULL;
> -
> - enum gen gen = gen_from_devinfo(devinfo);
> - if (opcode_descs[opcode].gens != 0) {
> - if ((opcode_descs[opcode].gens & gen) != 0) {
> - return &opcode_descs[opcode];
> - }
> - } else if (opcode_descs[opcode].table != NULL) {
> - const struct opcode_desc *table = opcode_descs[opcode].table;
> - for (unsigned i = 0; i < opcode_descs[opcode].size; i++) {
> - if ((table[i].gens & gen) != 0) {
> - return &table[i];
> + if (memcmp(index_devinfo, devinfo, sizeof(*devinfo))) {
Question: we are comparing a lot of bytes that seem irrelevant for
invalidating the table. Is it a win versus what was being done before,
i.e. invalidate by gen_device_info?
Thanks,
Caio
More information about the mesa-dev
mailing list