diff options
author | Ian Romanick <[email protected]> | 2019-06-24 15:30:35 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2019-06-28 18:56:19 -0700 |
commit | 02c6cd8481f466b8dd4769f9e9af3744fcc1ce1a (patch) | |
tree | 0b608a08da3a464119f048e2b22c57c71167a42e /src/compiler | |
parent | 1a43cf9a40e46b27ee5d3a536c2ea2a3073ea7f1 (diff) |
nir/serach: Increase maximum commutative expressions from 4 to 8
No shader-db change on any Intel platform. No shader-db run-time
difference on a certain 36-core / 72-thread system at 95% confidence
(n=20).
Reviewed-by: Connor Abbott <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/nir/nir_algebraic.py | 2 | ||||
-rw-r--r-- | src/compiler/nir/nir_search.c | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/compiler/nir/nir_algebraic.py b/src/compiler/nir/nir_algebraic.py index d7f8e48dec8..e79fa3cec5e 100644 --- a/src/compiler/nir/nir_algebraic.py +++ b/src/compiler/nir/nir_algebraic.py @@ -36,7 +36,7 @@ import traceback from nir_opcodes import opcodes, type_sizes # This should be the same as NIR_SEARCH_MAX_COMM_OPS in nir_search.c -nir_search_max_comm_ops = 4 +nir_search_max_comm_ops = 8 # These opcodes are only employed by nir_search. This provides a mapping from # opcode to destination type. diff --git a/src/compiler/nir/nir_search.c b/src/compiler/nir/nir_search.c index 1f68f78afa3..8e3c3529a74 100644 --- a/src/compiler/nir/nir_search.c +++ b/src/compiler/nir/nir_search.c @@ -31,7 +31,7 @@ #include "util/half_float.h" /* This should be the same as nir_search_max_comm_ops in nir_algebraic.py. */ -#define NIR_SEARCH_MAX_COMM_OPS 4 +#define NIR_SEARCH_MAX_COMM_OPS 8 struct match_state { bool inexact_match; @@ -632,6 +632,8 @@ nir_replace_instr(nir_builder *build, nir_alu_instr *instr, state.inexact_match = false; state.has_exact_alu = false; + STATIC_ASSERT(sizeof(state.comm_op_direction) * 8 >= NIR_SEARCH_MAX_COMM_OPS); + unsigned comm_expr_combinations = 1 << MIN2(search->comm_exprs, NIR_SEARCH_MAX_COMM_OPS); |