nir/range_analysis: Make sure the table validation only occurs once
authorIan Romanick <ian.d.romanick@intel.com>
Sat, 16 Nov 2019 21:19:47 +0000 (13:19 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 22 Nov 2019 16:16:06 +0000 (08:16 -0800)
commitca353285cb07c36bec0b7aa2f96df6d4c6827ff0
tree82950fb66ac285c3e81028b823a2899565bf6685
parentccefce46cb8e9030b3a9134964ab2f660f66391c
nir/range_analysis: Make sure the table validation only occurs once

All of the tables are static const, so they only need to be validated
once.  As noted in the previous commit, the compiler should be able to
eliminate all of this code when the assertions would pass.  Even with
the help of the previous commit, this does not always occur.

-Og: -95.688 +/- 3.91935 (-24.9562% +/- 1.0222%) N=5
-O1: No difference proven at 95.0% confidence. N=5
-O2: -1.962 +/- 0.85001 (-0.860013% +/- 0.372589%) N=5

Reviewed-by: Eric Anholt <eric@anholt.net>
src/compiler/nir/nir_range_analysis.c