[Mesa-dev] [PATCH 2/2] glsl: Use hash table cloning in copy propagation

2018-03-13 Thread Thomas Helland
Walking the whole hash table, inserting entries by hashing them first is just a really bad idea. We can simply memcpy the whole thing. While this does not have a major performance impact on average, as it only helps shaders with a lot of branches, it might help individual shaders quite a lot. For

Re: [Mesa-dev] [PATCH 2/2] glsl: Use hash table cloning in copy propagation

2018-03-12 Thread Eric Anholt
Thomas Helland writes: > Walking the whole hash table, inserting entries by hashing them first > is just a really bad idea. We can simply memcpy the whole thing. > --- > src/compiler/glsl/opt_copy_propagation.cpp | 13 -- >

Re: [Mesa-dev] [PATCH 2/2] glsl: Use hash table cloning in copy propagation

2018-03-12 Thread Emil Velikov
Hi Thomas, If I were you I'd split out the introduction of clone_acp() into a separate patch. Regardless of that suggestions, there seems to be a bug in this patch. On 12 March 2018 at 17:55, Thomas Helland wrote: > Walking the whole hash table, inserting entries by

[Mesa-dev] [PATCH 2/2] glsl: Use hash table cloning in copy propagation

2018-03-12 Thread Thomas Helland
Walking the whole hash table, inserting entries by hashing them first is just a really bad idea. We can simply memcpy the whole thing. --- src/compiler/glsl/opt_copy_propagation.cpp | 13 -- .../glsl/opt_copy_propagation_elements.cpp | 29 -- 2 files