Mesa (master): v3d: fix scheduling dependency tracking for ALU with small immediates

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jun 6 06:19:54 UTC 2019


Module: Mesa
Branch: master
Commit: 09d230c6cfdc2dfd1cf5eef28b158dadc636228f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=09d230c6cfdc2dfd1cf5eef28b158dadc636228f

Author: Iago Toral Quiroga <itoral at igalia.com>
Date:   Wed Jun  5 08:53:10 2019 +0200

v3d: fix scheduling dependency tracking for ALU with small immediates

We were not accountint for small immediates in the B mux so the scheduler
was interpreting these are regular register file accesses, which could
lead to additional (incorrect) write-read dependencies.

Shader-db changes:

total instructions in shared programs: 9163664 -> 9137263 (-0.29%)
instructions in affected programs: 3931035 -> 3904634 (-0.67%)
helped: 12457
HURT: 2563

total max-temps in shared programs: 1325787 -> 1325597 (-0.01%)
max-temps in affected programs: 5746 -> 5556 (-3.31%)
helped: 186
HURT: 16
helped stats (abs) min: 1 max: 4 x̄: 1.12 x̃: 1
helped stats (rel) min: 1.45% max: 22.22% x̄: 4.42% x̃: 3.28%
HURT stats (abs)   min: 1 max: 3 x̄: 1.12 x̃: 1
HURT stats (rel)   min: 2.86% max: 10.00% x̄: 5.76% x̃: 5.88%
95% mean confidence interval for max-temps value: -1.04 -0.84
95% mean confidence interval for max-temps %-change: -4.16% -3.07%
Max-temps are helped.

Reviewed-by: Eric Anholt <eric at anholt.net>

---

 src/broadcom/compiler/qpu_schedule.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/broadcom/compiler/qpu_schedule.c b/src/broadcom/compiler/qpu_schedule.c
index d275940c136..290cfe38780 100644
--- a/src/broadcom/compiler/qpu_schedule.c
+++ b/src/broadcom/compiler/qpu_schedule.c
@@ -153,7 +153,10 @@ process_mux_deps(struct schedule_state *state, struct schedule_node *n,
                 add_read_dep(state, state->last_rf[n->inst->qpu.raddr_a], n);
                 break;
         case V3D_QPU_MUX_B:
-                add_read_dep(state, state->last_rf[n->inst->qpu.raddr_b], n);
+                if (!n->inst->qpu.sig.small_imm) {
+                        add_read_dep(state,
+                                     state->last_rf[n->inst->qpu.raddr_b], n);
+                }
                 break;
         default:
                 add_read_dep(state, state->last_r[mux - V3D_QPU_MUX_R0], n);




More information about the mesa-commit mailing list