diff options
author | Christoph Bumiller <[email protected]> | 2011-02-08 16:55:06 +0100 |
---|---|---|
committer | Christoph Bumiller <[email protected]> | 2011-02-09 16:05:00 +0100 |
commit | 0691530b7f01f3106f7b4d697cd7a42f86fa23d5 (patch) | |
tree | a19e65bedf90a5a1c7499866499b263cff1d0d44 /src/gallium/drivers/nvc0/nvc0_pc.c | |
parent | 0f776fea432052c00972ae1c6a0fbf76ec5e0b6c (diff) |
nvc0: replace branching with predicated insns where feasible
Diffstat (limited to 'src/gallium/drivers/nvc0/nvc0_pc.c')
-rw-r--r-- | src/gallium/drivers/nvc0/nvc0_pc.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/gallium/drivers/nvc0/nvc0_pc.c b/src/gallium/drivers/nvc0/nvc0_pc.c index a2006321021..e0cba05b976 100644 --- a/src/gallium/drivers/nvc0/nvc0_pc.c +++ b/src/gallium/drivers/nvc0/nvc0_pc.c @@ -55,15 +55,11 @@ nvc0_insn_can_load(struct nv_instruction *nvi, int s, boolean nvc0_insn_is_predicateable(struct nv_instruction *nvi) { - int s; - - if (!nv_op_predicateable(nvi->opcode)) + if (nvi->predicate >= 0) /* already predicated */ return FALSE; - if (nvi->predicate >= 0) + if (!nvc0_op_info_table[nvi->opcode].predicate && + !nvc0_op_info_table[nvi->opcode].pseudo) return FALSE; - for (s = 0; s < 4 && nvi->src[s]; ++s) - if (nvi->src[s]->value->reg.file == NV_FILE_IMM) - return FALSE; return TRUE; } @@ -505,6 +501,9 @@ nvc0_insn_append(struct nv_basic_block *b, struct nv_instruction *i) i->bb = b; b->num_instructions++; + + if (i->prev && i->prev->terminator) + nvc0_insns_permute(i->prev, i); } void |