summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_qir.h
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2014-08-25 00:12:21 -0700
committerEric Anholt <[email protected]>2014-09-04 11:39:51 -0700
commit55d2a1626219ac041ce05477827b592efa1c7b81 (patch)
tree8cd77b31a7e725ff3fd34933dfd481246d5955ad /src/gallium/drivers/vc4/vc4_qir.h
parent80b27ca2cd8cd2bb2937baa441c43a396887cc03 (diff)
vc4: Add a CSE optimization pass.
Debugging a regression in discard support was just too full of duplicate instructions, so I decided to remove them instead of re-analyzing each of them as I dumped their outputs in simulation.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_qir.h')
-rw-r--r--src/gallium/drivers/vc4/vc4_qir.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_qir.h b/src/gallium/drivers/vc4/vc4_qir.h
index 2e210c3bd60..7336a3733de 100644
--- a/src/gallium/drivers/vc4/vc4_qir.h
+++ b/src/gallium/drivers/vc4/vc4_qir.h
@@ -28,6 +28,7 @@
#include <stdlib.h>
#include <stdbool.h>
#include <stdint.h>
+#include <string.h>
#include "util/u_simple_list.h"
@@ -227,6 +228,9 @@ struct qreg qir_get_temp(struct qcompile *c);
int qir_get_op_nsrc(enum qop qop);
bool qir_reg_equals(struct qreg a, struct qreg b);
bool qir_has_side_effects(struct qinst *inst);
+bool qir_depends_on_flags(struct qinst *inst);
+bool qir_writes_r4(struct qinst *inst);
+bool qir_reads_r4(struct qinst *inst);
void qir_dump(struct qcompile *c);
void qir_dump_inst(struct qinst *inst);
@@ -235,6 +239,7 @@ const char *qir_get_stage_name(enum qstage stage);
void qir_optimize(struct qcompile *c);
bool qir_opt_algebraic(struct qcompile *c);
bool qir_opt_copy_propagation(struct qcompile *c);
+bool qir_opt_cse(struct qcompile *c);
bool qir_opt_dead_code(struct qcompile *c);
#define QIR_ALU0(name) \