pan/bi: Add writes_reg predicate

ATEST is a bit of a wrinkle in this, so let's keep it in one place.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8354>
This commit is contained in:
Alyssa Rosenzweig 2021-01-06 17:39:44 -05:00 committed by Marge Bot
parent fb27baa35a
commit 2537a53d5c

View file

@ -666,6 +666,17 @@ bi_has_cross_passthrough_hazard(bi_tuple *succ, bi_instr *ins)
return false;
}
/* Is a register written other than the staging mechanism? ATEST is special,
* writing to both a staging register and a regular register (fixed packing)*/
static bool
bi_writes_reg(bi_instr *instr)
{
return (instr->op == BI_OPCODE_ATEST) ||
(!bi_is_null(instr->dest[0]) &&
!bi_opcode_props[instr->op].sr_write);
}
#ifndef NDEBUG
static bi_builder *