summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <alyssa@collabora.com>2021-03-02 16:54:33 +0000
committerMarge Bot <eric+marge@anholt.net>2021-04-03 19:18:55 +0000
commit52863f2e60fae865ef6a2a2e5a385b252c73364c (patch)
tree509e80044a83f90de1c6612268c57ef02c74854e
parent0bd01e86f32779cb48c27f97fd34893c71b6f2c9 (diff)
pan/bi: Enable all nir_opt_move/sink optimizations
total instructions in shared programs: 116716 -> 116716 (0.00%) total nops in shared programs: 86280 -> 84996 (-1.49%) nops in affected programs: 50485 -> 49201 (-2.54%) Nops are helped. total clauses in shared programs: 20993 -> 20732 (-1.24%) clauses in affected programs: 7737 -> 7476 (-3.37%) Clauses are helped. total quadwords in shared programs: 91697 -> 91155 (-0.59%) quadwords in affected programs: 52123 -> 51581 (-1.04%) Quadwords are helped. total spills in shared programs: 0 -> 0 total fills in shared programs: 0 -> 0 Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10020>
-rw-r--r--src/panfrost/bifrost/bifrost_compile.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c
index e76fe4cd8a9..d41c17f3c42 100644
--- a/src/panfrost/bifrost/bifrost_compile.c
+++ b/src/panfrost/bifrost/bifrost_compile.c
@@ -2864,8 +2864,12 @@ bi_optimize_nir(nir_shader *nir)
/* Backend scheduler is purely local, so do some global optimizations
* to reduce register pressure */
- NIR_PASS_V(nir, nir_opt_sink, nir_move_const_undef);
- NIR_PASS_V(nir, nir_opt_move, nir_move_const_undef);
+ nir_move_options move_all =
+ nir_move_const_undef | nir_move_load_ubo | nir_move_load_input |
+ nir_move_comparisons | nir_move_copies | nir_move_load_ssbo;
+
+ NIR_PASS_V(nir, nir_opt_sink, move_all);
+ NIR_PASS_V(nir, nir_opt_move, move_all);
NIR_PASS(progress, nir, nir_lower_load_const_to_scalar);