aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDylan Baker <[email protected]>2019-02-11 16:26:37 -0800
committerDylan Baker <[email protected]>2019-02-12 09:42:59 -0800
commitca36eb12fdfb29c19379c666d24fd8c2d75064cd (patch)
tree512df4ffbc80faa7e050073d04d1cfd0eef21bcf
parent9dd433dfa72b9ce95881d97a3184c6db5e8b0629 (diff)
Revert "intel/compiler: More peephole select"
This reverts commit 8fb8ebfbb05d3323481c8ba6d320b3a3580bad99.
-rw-r--r--src/intel/compiler/brw_nir.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c
index d7243f35b3d..90fe7e7c85d 100644
--- a/src/intel/compiler/brw_nir.c
+++ b/src/intel/compiler/brw_nir.c
@@ -570,18 +570,7 @@ brw_nir_optimize(nir_shader *nir, const struct brw_compiler *compiler,
OPT(nir_opt_dce);
OPT(nir_opt_cse);
- /* Passing 0 to the peephole select pass causes it to convert
- * if-statements that contain only move instructions in the branches
- * regardless of the count.
- *
- * Passing 1 to the peephole select pass causes it to convert
- * if-statements that contain at most a single ALU instruction (total)
- * in both branches. Before Gen6, some math instructions were
- * prohibitively expensive and the results of compare operations need an
- * extra resolve step. For these reasons, this pass is more harmful
- * than good on those platforms.
- *
- * For indirect loads of uniforms (push constants), we assume that array
+ /* For indirect loads of uniforms (push constants), we assume that array
* indices will nearly always be in bounds and the cost of the load is
* low. Therefore there shouldn't be a performance benefit to avoid it.
* However, in vec4 tessellation shaders, these loads operate by
@@ -591,8 +580,6 @@ brw_nir_optimize(nir_shader *nir, const struct brw_compiler *compiler,
(nir->info.stage == MESA_SHADER_TESS_CTRL ||
nir->info.stage == MESA_SHADER_TESS_EVAL);
OPT(nir_opt_peephole_select, 0, !is_vec4_tessellation);
- if (compiler->devinfo->gen >= 6)
- OPT(nir_opt_peephole_select, 1, !is_vec4_tessellation);
OPT(nir_opt_intrinsics);
OPT(nir_opt_idiv_const, 32);