diff options
author | Rob Clark <[email protected]> | 2018-01-19 16:13:09 -0500 |
---|---|---|
committer | Rob Clark <[email protected]> | 2018-02-10 14:54:58 -0500 |
commit | ec8bc54ad2ce4e05ff8e3679672a616b1984be80 (patch) | |
tree | c0098b7ae77c386c4be80acaeb08ef266b5a087e | |
parent | a7ea2b4eba003440e82626f025f783c8f250bd30 (diff) |
freedreno/ir3: use peephole select pass
Agressively lowering all if/else to selects in some extreme cases
results in much higher register pressure. Using peephole select instead
with a modest threshold speeds up alu2 4x!
16 seems like a good limit, low enough to help alu2 but not too low that
it penalizes everything else. With a bit better scheduling of the
instruction that moves a value into a predicate register, we might be
able to lower this limit a bit more in the future, but since we need 6
cycles from the move to predicate register to predicated branch, that
puts some sort of lower bound on how far we can lower this threshold.
Signed-off-by: Rob Clark <[email protected]>
-rw-r--r-- | src/gallium/drivers/freedreno/ir3/ir3_nir.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_nir.c b/src/gallium/drivers/freedreno/ir3/ir3_nir.c index 81a46be914e..e76b39b2304 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_nir.c +++ b/src/gallium/drivers/freedreno/ir3/ir3_nir.c @@ -97,7 +97,7 @@ ir3_optimize_loop(nir_shader *s) progress |= OPT(s, nir_copy_prop); progress |= OPT(s, nir_opt_dce); progress |= OPT(s, nir_opt_cse); - progress |= OPT(s, ir3_nir_lower_if_else); + progress |= OPT(s, nir_opt_peephole_select, 16); progress |= OPT(s, nir_opt_algebraic); progress |= OPT(s, nir_opt_constant_folding); |