[Mesa-dev] [PATCH] glsl: optimize list handling in opt_dead_code
Eero Tamminen
eero.t.tamminen at intel.com
Tue Oct 18 09:29:59 UTC 2016
Hi,
On 18.10.2016 01:07, Jan Ziak wrote:
> This patch replaces the ir_variable_refcount_entry's linked-list
> with an array-list.
>
> The array-list has local storage which does not require ANY additional
> allocations if the list has small number of elements. The size of this
> storage is configurable for each variable.
>
> Benchmark results for "./run -1 shaders" from shader-db[1]:
>
> - The total number of executed instructions goes down from 64.184 to 63.797
> giga-instructions when Mesa is compiled with "gcc -O0 ..."
Please don't do performance related decisions based on data from
compiling code with optimizations disabled. Use -O2 or -O3 (or even
better, check both).
> - In the call tree starting at function do_dead_code():
> - the number of calls to malloc() is reduced by about 10%
> - the number of calls to free() is reduced by about 30%
>
> [1] git://anongit.freedesktop.org/mesa/shader-db
- Eero
More information about the mesa-dev
mailing list