intel: Early exit from inst_is_in_block().
authorEmma Anholt <emma@anholt.net>
Mon, 28 Jun 2021 22:56:38 +0000 (15:56 -0700)
committerMarge Bot <eric+marge@anholt.net>
Tue, 29 Jun 2021 16:48:40 +0000 (16:48 +0000)
commitb18cf54f0d558c926a17ac2ffc93d866af678d82
treed4e417abf6cff37c0ced16e5bf2a02ab89e53a5e
parent3a9716e6b1f0f7ab9d03412f47ff64d757d8285d
intel: Early exit from inst_is_in_block().

Surely the compiler would sort that out, you would think.  But no, my
debugoptimized build improves
dEQP-GLES31.functional.ubo.random.all_per_block_buffers.13 runtime by 25%
on my SKL from this change.

This was the slowest test in the GLES31 tests on APL in CI, at 22s.  And
yes, we were spending around half of our runtime in this function.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11631>
src/intel/compiler/brw_shader.cpp