From 7db6d8d7482a9214a20470cfe3c833bd9284e2ca Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Thu, 10 Jun 2021 19:05:14 -0400 Subject: [PATCH] pan/bi: Move bi_word_node to common code Signed-off-by: Alyssa Rosenzweig Part-of: --- 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 */