[Mesa-dev] [PATCH 04/56] anv/entrypoints: Generalize the string map a bit
Emil Velikov
emil.l.velikov at gmail.com
Thu Mar 8 17:29:57 UTC 2018
On 7 March 2018 at 14:34, Jason Ekstrand <jason at jlekstrand.net> wrote:
> The original string map assumed that the mapping from strings to
> entrypoints was a bijection. This will not be true the moment we
> add entrypoint aliasing. This reworks things to be an arbitrary map
> from strings to non-negative signed integers. The old one also had a
> potential bug if we ever had a hash collision because it didn't do the
> strcmp inside the lookup loop. While we're at it, we break things out
> into a helpful class.
>
Instead of reworking it one can use a simple gcc/clang alias or
writing it out manually.
I'd imagine that the original code is faster, so there's little point
in using something else ;-)
[static] return_type
alias_name(args) __attribute__ ((alias(original_function)));
-Emil
More information about the mesa-dev
mailing list