pan/bi: Move bi_word_node to common code

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11327>
This commit is contained in:
Alyssa Rosenzweig
2021-06-10 19:05:14 -04:00
committed by Marge Bot
parent 7ad9e1e5a5
commit 7db6d8d748
2 changed files with 6 additions and 7 deletions
-7
View File
@@ -34,13 +34,6 @@ bi_is_copy(bi_instr *ins)
|| ins->src[0].type == BI_INDEX_CONSTANT);
}
static inline unsigned
bi_word_node(bi_index idx)
{
assert(idx.type == BI_INDEX_NORMAL && !idx.reg);
return (idx.value << 2) | idx.offset;
}
static bool
bi_reads_fau(bi_instr *ins)
{
+6
View File
@@ -989,6 +989,12 @@ bi_builder_insert(bi_cursor *cursor, bi_instr *I)
unreachable("Invalid cursor option");
}
static inline unsigned
bi_word_node(bi_index idx)
{
assert(idx.type == BI_INDEX_NORMAL && !idx.reg);
return (idx.value << 2) | idx.offset;
}
/* NIR passes */