mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 02:38:04 +02:00
nir/search_helpers: add has_multiple_uses helper
heuristic for the next patch. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Mel Henning <mhenning@darkrefraction.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35720>
This commit is contained in:
parent
22272c71f2
commit
6efe557718
1 changed files with 9 additions and 0 deletions
|
|
@ -498,6 +498,15 @@ is_not_const_and_not_fsign(struct hash_table *ht, const nir_alu_instr *instr,
|
|||
!is_fsign(instr, src, num_components, swizzle);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
has_multiple_uses(struct hash_table *ht, const nir_alu_instr *instr,
|
||||
unsigned src, unsigned num_components,
|
||||
const uint8_t *swizzle)
|
||||
{
|
||||
return !list_is_empty(&instr->def.uses) &&
|
||||
!list_is_singular(&instr->def.uses);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
is_used_once(const nir_alu_instr *instr)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue