nir: prehash instruction in nir_instr_set_add_or_rewrite()
authorTimothy Arceri <tarceri@itsqueeze.com>
Wed, 13 Feb 2019 04:17:44 +0000 (15:17 +1100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Wed, 13 Feb 2019 22:35:32 +0000 (09:35 +1100)
commit0a89c9779a835331dab33dfb852e4b0ab4269de1
treed2914f93e4e87144628bdae63d0e3952bbee9bba
parent279060cd32dd673c6a5bf302ceac852f51a6c17c
nir: prehash instruction in nir_instr_set_add_or_rewrite()

There is no need to hash the instruction twice, especially as we
end up adding it in the majority of cases.

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/nir/nir_instr_set.c