pan/bi: Add discard flag to bi_index
Needed to model Valhall instructions. Should also be useful to RA if we ever get around to doing something SSA based. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026>
This commit is contained in:
parent
be95198de5
commit
1cde245f76
|
@ -75,6 +75,9 @@ bir_passthrough_name(unsigned idx)
|
|||
static void
|
||||
bi_print_index(FILE *fp, bi_index index)
|
||||
{
|
||||
if (index.discard)
|
||||
fputs("`", fp);
|
||||
|
||||
if (bi_is_null(index))
|
||||
fprintf(fp, "_");
|
||||
else if (index.type == BI_INDEX_CONSTANT)
|
||||
|
|
|
@ -83,6 +83,10 @@ typedef struct {
|
|||
bool abs : 1;
|
||||
bool neg : 1;
|
||||
|
||||
/* The last use of a value, should be purged from the register cache.
|
||||
* Set by liveness analysis. */
|
||||
bool discard : 1;
|
||||
|
||||
/* For a source, the swizzle. For a destination, acts a bit like a
|
||||
* write mask. Identity for the full 32-bit, H00 for only caring about
|
||||
* the lower half, other values unused. */
|
||||
|
@ -207,6 +211,13 @@ bi_neg(bi_index idx)
|
|||
return idx;
|
||||
}
|
||||
|
||||
static inline bi_index
|
||||
bi_discard(bi_index idx)
|
||||
{
|
||||
idx.discard = true;
|
||||
return idx;
|
||||
}
|
||||
|
||||
/* Additive identity in IEEE 754 arithmetic */
|
||||
static inline bi_index
|
||||
bi_negzero()
|
||||
|
|
Loading…
Reference in New Issue