pan/bi: Add "word equivalence" relation for index

Takes offset *but not swizzle* into account, so the scheduler can
predict whether indices will end up mapped to the same scalar register.

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/8723>
This commit is contained in:
Alyssa Rosenzweig 2020-12-29 16:56:23 -05:00 committed by Marge Bot
parent ab6f05eabd
commit 81692b6d2c
1 changed files with 10 additions and 0 deletions

View File

@ -232,6 +232,16 @@ bi_is_equiv(bi_index left, bi_index right)
(left.value == right.value);
}
/* A stronger equivalence relation that requires the indices access the
* same offset, useful for RA/scheduling to see what registers will
* correspond to */
static inline bool
bi_is_word_equiv(bi_index left, bi_index right)
{
return bi_is_equiv(left, right) && left.offset == right.offset;
}
#define BI_MAX_DESTS 2
#define BI_MAX_SRCS 4