fprintf(stderr, "\n");
}
-static struct qreg
-follow_movs(struct qinst **defs, struct qreg reg)
-{
- while (reg.file == QFILE_TEMP && defs[reg.index]->op == QOP_MOV)
- reg = defs[reg.index]->src[0];
-
- return reg;
-}
-
static bool
is_zero(struct vc4_compile *c, struct qinst **defs, struct qreg reg)
{
- reg = follow_movs(defs, reg);
+ reg = qir_follow_movs(defs, reg);
return (reg.file == QFILE_UNIF &&
c->uniform_contents[reg.index] == QUNIFORM_CONSTANT &&
static bool
is_1f(struct vc4_compile *c, struct qinst **defs, struct qreg reg)
{
- reg = follow_movs(defs, reg);
+ reg = qir_follow_movs(defs, reg);
return (reg.file == QFILE_UNIF &&
c->uniform_contents[reg.index] == QUNIFORM_CONSTANT &&
free(qinst);
}
+struct qreg
+qir_follow_movs(struct qinst **defs, struct qreg reg)
+{
+ while (reg.file == QFILE_TEMP && defs[reg.index]->op == QOP_MOV)
+ reg = defs[reg.index]->src[0];
+
+ return reg;
+}
+
void
qir_compile_destroy(struct vc4_compile *c)
{
bool qir_depends_on_flags(struct qinst *inst);
bool qir_writes_r4(struct qinst *inst);
bool qir_reads_r4(struct qinst *inst);
+struct qreg qir_follow_movs(struct qinst **defs, struct qreg reg);
void qir_dump(struct vc4_compile *c);
void qir_dump_inst(struct vc4_compile *c, struct qinst *inst);