summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_qir.h
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2016-03-10 12:53:57 -0800
committerEric Anholt <[email protected]>2016-07-12 17:41:59 -0700
commit89918c1e74e454af119e7ae23f3ed66fc26abc4b (patch)
tree478573a747b23657f6c597e90930be5b3d54da9b /src/gallium/drivers/vc4/vc4_qir.h
parentf2eb8e30529780ef7f69f8f5a74707feaa96834c (diff)
vc4: Implement live intervals using a CFG.
Right now our CFG is always a trivial single basic block, but that will change when enable loops.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_qir.h')
-rw-r--r--src/gallium/drivers/vc4/vc4_qir.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/gallium/drivers/vc4/vc4_qir.h b/src/gallium/drivers/vc4/vc4_qir.h
index f3e65756f64..5099b7f1f1c 100644
--- a/src/gallium/drivers/vc4/vc4_qir.h
+++ b/src/gallium/drivers/vc4/vc4_qir.h
@@ -38,6 +38,7 @@
#include "vc4_screen.h"
#include "vc4_qpu_defines.h"
+#include "vc4_qpu.h"
#include "kernel/vc4_packet.h"
#include "pipe/p_state.h"
@@ -353,6 +354,14 @@ struct qblock {
struct qblock *successors[2];
int index;
+
+ /** @{ used by vc4_qir_live_variables.c */
+ BITSET_WORD *def;
+ BITSET_WORD *use;
+ BITSET_WORD *live_in;
+ BITSET_WORD *live_out;
+ int start_ip, end_ip;
+ /** @} */
};
struct vc4_compile {
@@ -422,6 +431,9 @@ struct vc4_compile {
struct vc4_fs_key *fs_key;
struct vc4_vs_key *vs_key;
+ /* Live ranges of temps. */
+ int *temp_start, *temp_end;
+
uint32_t *uniform_data;
enum quniform_contents *uniform_contents;
uint32_t uniform_array_size;
@@ -488,6 +500,7 @@ struct qreg qir_emit_def(struct vc4_compile *c, struct qinst *inst);
struct qinst *qir_emit_nondef(struct vc4_compile *c, struct qinst *inst);
struct qreg qir_get_temp(struct vc4_compile *c);
+void qir_calculate_live_intervals(struct vc4_compile *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 vc4_compile *c, struct qinst *inst);
@@ -499,6 +512,7 @@ bool qir_is_float_input(struct qinst *inst);
bool qir_depends_on_flags(struct qinst *inst);
bool qir_writes_r4(struct qinst *inst);
struct qreg qir_follow_movs(struct vc4_compile *c, struct qreg reg);
+uint8_t qir_channels_written(struct qinst *inst);
void qir_dump(struct vc4_compile *c);
void qir_dump_inst(struct vc4_compile *c, struct qinst *inst);
@@ -667,7 +681,7 @@ qir_SEL(struct vc4_compile *c, uint8_t cond, struct qreg src0, struct qreg src1)
struct qinst *a = qir_MOV_dest(c, t, src0);
struct qinst *b = qir_MOV_dest(c, t, src1);
a->cond = cond;
- b->cond = cond ^ 1;
+ b->cond = qpu_cond_complement(cond);
return t;
}