mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 17:40:11 +01:00
nir/search: Constify instr parameter to nir_search_expression::cond
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13999>
This commit is contained in:
parent
4dd4135551
commit
97ce3a56bd
2 changed files with 10 additions and 10 deletions
|
|
@ -192,7 +192,7 @@ typedef union {
|
||||||
nir_search_expression expression;
|
nir_search_expression expression;
|
||||||
} nir_search_value_union;
|
} nir_search_value_union;
|
||||||
|
|
||||||
typedef bool (*nir_search_expression_cond)(nir_alu_instr *instr);
|
typedef bool (*nir_search_expression_cond)(const nir_alu_instr *instr);
|
||||||
typedef bool (*nir_search_variable_cond)(struct hash_table *range_ht,
|
typedef bool (*nir_search_variable_cond)(struct hash_table *range_ht,
|
||||||
const nir_alu_instr *instr,
|
const nir_alu_instr *instr,
|
||||||
unsigned src, unsigned num_components,
|
unsigned src, unsigned num_components,
|
||||||
|
|
|
||||||
|
|
@ -333,7 +333,7 @@ is_not_const_and_not_fsign(struct hash_table *ht, const nir_alu_instr *instr,
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool
|
static inline bool
|
||||||
is_used_once(nir_alu_instr *instr)
|
is_used_once(const nir_alu_instr *instr)
|
||||||
{
|
{
|
||||||
bool zero_if_use = list_is_empty(&instr->dest.dest.ssa.if_uses);
|
bool zero_if_use = list_is_empty(&instr->dest.dest.ssa.if_uses);
|
||||||
bool zero_use = list_is_empty(&instr->dest.dest.ssa.uses);
|
bool zero_use = list_is_empty(&instr->dest.dest.ssa.uses);
|
||||||
|
|
@ -355,19 +355,19 @@ is_used_once(nir_alu_instr *instr)
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool
|
static inline bool
|
||||||
is_used_by_if(nir_alu_instr *instr)
|
is_used_by_if(const nir_alu_instr *instr)
|
||||||
{
|
{
|
||||||
return !list_is_empty(&instr->dest.dest.ssa.if_uses);
|
return !list_is_empty(&instr->dest.dest.ssa.if_uses);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool
|
static inline bool
|
||||||
is_not_used_by_if(nir_alu_instr *instr)
|
is_not_used_by_if(const nir_alu_instr *instr)
|
||||||
{
|
{
|
||||||
return list_is_empty(&instr->dest.dest.ssa.if_uses);
|
return list_is_empty(&instr->dest.dest.ssa.if_uses);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool
|
static inline bool
|
||||||
is_used_by_non_fsat(nir_alu_instr *instr)
|
is_used_by_non_fsat(const nir_alu_instr *instr)
|
||||||
{
|
{
|
||||||
nir_foreach_use(src, &instr->dest.dest.ssa) {
|
nir_foreach_use(src, &instr->dest.dest.ssa) {
|
||||||
const nir_instr *const user_instr = src->parent_instr;
|
const nir_instr *const user_instr = src->parent_instr;
|
||||||
|
|
@ -386,7 +386,7 @@ is_used_by_non_fsat(nir_alu_instr *instr)
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool
|
static inline bool
|
||||||
is_only_used_as_float(nir_alu_instr *instr)
|
is_only_used_as_float(const nir_alu_instr *instr)
|
||||||
{
|
{
|
||||||
nir_foreach_use(src, &instr->dest.dest.ssa) {
|
nir_foreach_use(src, &instr->dest.dest.ssa) {
|
||||||
const nir_instr *const user_instr = src->parent_instr;
|
const nir_instr *const user_instr = src->parent_instr;
|
||||||
|
|
@ -406,13 +406,13 @@ is_only_used_as_float(nir_alu_instr *instr)
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool
|
static inline bool
|
||||||
only_lower_8_bits_used(nir_alu_instr *instr)
|
only_lower_8_bits_used(const nir_alu_instr *instr)
|
||||||
{
|
{
|
||||||
return (nir_ssa_def_bits_used(&instr->dest.dest.ssa) & ~0xffull) == 0;
|
return (nir_ssa_def_bits_used(&instr->dest.dest.ssa) & ~0xffull) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool
|
static inline bool
|
||||||
only_lower_16_bits_used(nir_alu_instr *instr)
|
only_lower_16_bits_used(const nir_alu_instr *instr)
|
||||||
{
|
{
|
||||||
return (nir_ssa_def_bits_used(&instr->dest.dest.ssa) & ~0xffffull) == 0;
|
return (nir_ssa_def_bits_used(&instr->dest.dest.ssa) & ~0xffffull) == 0;
|
||||||
}
|
}
|
||||||
|
|
@ -466,13 +466,13 @@ is_lower_half_zero(UNUSED struct hash_table *ht, const nir_alu_instr *instr,
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool
|
static inline bool
|
||||||
no_signed_wrap(nir_alu_instr *instr)
|
no_signed_wrap(const nir_alu_instr *instr)
|
||||||
{
|
{
|
||||||
return instr->no_signed_wrap;
|
return instr->no_signed_wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool
|
static inline bool
|
||||||
no_unsigned_wrap(nir_alu_instr *instr)
|
no_unsigned_wrap(const nir_alu_instr *instr)
|
||||||
{
|
{
|
||||||
return instr->no_unsigned_wrap;
|
return instr->no_unsigned_wrap;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue