vc4: Disable vc4_opt_vpm in the presence of control flow.

It's a really valuable pass currently, but it will be a mess to rewrite
for control flow.  For now, just disable it if we have multiple blocks
present.
This commit is contained in:
Eric Anholt 2016-07-08 17:06:18 -07:00
parent ee69cfd11d
commit 37ecc61662
1 changed files with 5 additions and 0 deletions

View File

@ -38,6 +38,11 @@ qir_opt_vpm(struct vc4_compile *c)
if (c->stage == QSTAGE_FRAG)
return false;
/* For now, only do this pass when we don't have control flow. */
struct qblock *block = qir_entry_block(c);
if (block != qir_exit_block(c))
return false;
bool progress = false;
struct qinst *vpm_writes[64] = { 0 };
uint32_t use_count[c->num_temps];