summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_qir_schedule.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2015-12-22 13:37:36 -0800
committerEric Anholt <eric@anholt.net>2016-01-06 12:39:51 -0800
commit71db7d3dc577e48da3689fd66989ec3b0a069089 (patch)
tree450fb776d1617cbdec4160d81a87480599c7dbb1 /src/gallium/drivers/vc4/vc4_qir_schedule.c
parent0a89f307f95de3a3357d834f36c60fe803895f8a (diff)
downloadexternal_mesa3d-71db7d3dc577e48da3689fd66989ec3b0a069089.zip
external_mesa3d-71db7d3dc577e48da3689fd66989ec3b0a069089.tar.gz
external_mesa3d-71db7d3dc577e48da3689fd66989ec3b0a069089.tar.bz2
vc4: Replace the SSA-style SEL operators with conditional MOVs.
I'm moving away from QIR being SSA (since NIR is doing lots of SSA optimization for us now) and instead having QIR just be QPU operations with virtual registers. By making our SELs be composed of two MOVs, we could potentially coalesce the registers for the MOV's src and dst and eliminate the MOV. total instructions in shared programs: 88448 -> 88028 (-0.47%) instructions in affected programs: 39845 -> 39425 (-1.05%) total estimated cycles in shared programs: 246306 -> 245762 (-0.22%) estimated cycles in affected programs: 162887 -> 162343 (-0.33%)
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_qir_schedule.c')
-rw-r--r--src/gallium/drivers/vc4/vc4_qir_schedule.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gallium/drivers/vc4/vc4_qir_schedule.c b/src/gallium/drivers/vc4/vc4_qir_schedule.c
index d20815f..2f280c5 100644
--- a/src/gallium/drivers/vc4/vc4_qir_schedule.c
+++ b/src/gallium/drivers/vc4/vc4_qir_schedule.c
@@ -250,12 +250,11 @@ calculate_deps(struct schedule_setup_state *state, struct schedule_node *n)
else if (inst->dst.file == QFILE_TEMP)
add_write_dep(dir, &state->last_temp_write[inst->dst.index], n);
+ if (qir_depends_on_flags(inst))
+ add_dep(dir, state->last_sf, n);
+
if (inst->sf)
add_write_dep(dir, &state->last_sf, n);
-
- if (qir_depends_on_flags(inst)) {
- add_dep(dir, state->last_sf, n);
- }
}
static void