summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_qir.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2015-01-10 14:57:16 +1300
committerEric Anholt <[email protected]>2015-01-10 15:24:46 +1300
commitc772c92153fdcd4ba4920b7ef1745ce83b09603b (patch)
treec674f7ce50d3c071c116d38441952e08d8af2bce /src/gallium/drivers/vc4/vc4_qir.c
parenta58ae83882b3ad3ecb53271f42cf1fd8f9c2907c (diff)
vc4: Split two notions of instructions having side effects.
Some ops can't be DCEd, while some of the ops that are just important due to the args they have can be.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_qir.c')
-rw-r--r--src/gallium/drivers/vc4/vc4_qir.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gallium/drivers/vc4/vc4_qir.c b/src/gallium/drivers/vc4/vc4_qir.c
index 4f73932e233..40356c99ff3 100644
--- a/src/gallium/drivers/vc4/vc4_qir.c
+++ b/src/gallium/drivers/vc4/vc4_qir.c
@@ -141,6 +141,12 @@ qir_get_op_nsrc(enum qop qop)
bool
qir_has_side_effects(struct vc4_compile *c, struct qinst *inst)
{
+ return qir_op_info[inst->op].has_side_effects;
+}
+
+bool
+qir_has_side_effect_reads(struct vc4_compile *c, struct qinst *inst)
+{
/* We can dead-code eliminate varyings, because we only tell the VS
* about the live ones at the end. But we have to preserve the
* point/line coordinates reads, because they're generated by
@@ -159,7 +165,7 @@ qir_has_side_effects(struct vc4_compile *c, struct qinst *inst)
if (inst->dst.file == QFILE_VPM)
return true;
- return qir_op_info[inst->op].has_side_effects;
+ return false;
}
bool