Mesa (main): pan/bi: Move bi_word_node to common code
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jun 15 20:41:30 UTC 2021
Module: Mesa
Branch: main
Commit: 7db6d8d7482a9214a20470cfe3c833bd9284e2ca
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7db6d8d7482a9214a20470cfe3c833bd9284e2ca
Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date: Thu Jun 10 19:05:14 2021 -0400
pan/bi: Move bi_word_node to common code
Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11327>
---
src/panfrost/bifrost/bi_opt_copy_prop.c | 7 -------
src/panfrost/bifrost/compiler.h | 6 ++++++
2 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/src/panfrost/bifrost/bi_opt_copy_prop.c b/src/panfrost/bifrost/bi_opt_copy_prop.c
index 593297249eb..547bbf92c60 100644
--- a/src/panfrost/bifrost/bi_opt_copy_prop.c
+++ b/src/panfrost/bifrost/bi_opt_copy_prop.c
@@ -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)
{
diff --git a/src/panfrost/bifrost/compiler.h b/src/panfrost/bifrost/compiler.h
index 36ddee0b46c..e41d62ea8ab 100644
--- a/src/panfrost/bifrost/compiler.h
+++ b/src/panfrost/bifrost/compiler.h
@@ -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 */
More information about the mesa-commit
mailing list