aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_opt_dead_code.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2016-06-03 14:36:04 -0700
committerEric Anholt <[email protected]>2016-07-04 16:33:22 -0700
commit200b4e4bd5e87fea91193e3d1976b9cf0eabf8ba (patch)
tree0b962b15999588d421df9bf40a52857bc1cfc8a2 /src/gallium/drivers/vc4/vc4_opt_dead_code.c
parentaa76ba6f2fb0d6438b2b652d9fa466b6cf77fa31 (diff)
vc4: Move SF removal to a separate peephole pass.
The DCE pass is going to change significantly to handle control flow, while we don't really need to change it for the SF handling. We also need to add some more SF peephole optimization for SF updates generated by control flow support. No change on shader-db.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_opt_dead_code.c')
-rw-r--r--src/gallium/drivers/vc4/vc4_opt_dead_code.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/gallium/drivers/vc4/vc4_opt_dead_code.c b/src/gallium/drivers/vc4/vc4_opt_dead_code.c
index ad51ed779ea..0256159fc69 100644
--- a/src/gallium/drivers/vc4/vc4_opt_dead_code.c
+++ b/src/gallium/drivers/vc4/vc4_opt_dead_code.c
@@ -82,7 +82,6 @@ qir_opt_dead_code(struct vc4_compile *c)
{
bool progress = false;
bool *used = calloc(c->num_temps, sizeof(bool));
- bool sf_used = false;
list_for_each_entry_safe_rev(struct qinst, inst, &c->instructions,
link) {
@@ -109,22 +108,6 @@ qir_opt_dead_code(struct vc4_compile *c)
continue;
}
- if (qir_depends_on_flags(inst))
- sf_used = true;
- if (inst->sf) {
- if (!sf_used) {
- if (debug) {
- fprintf(stderr, "Removing SF on: ");
- qir_dump_inst(c, inst);
- fprintf(stderr, "\n");
- }
-
- inst->sf = false;
- progress = true;
- }
- sf_used = false;
- }
-
for (int i = 0; i < qir_get_op_nsrc(inst->op); i++) {
if (inst->src[i].file == QFILE_TEMP)
used[inst->src[i].index] = true;