#include <math.h>
static inline bool
-is_pos_power_of_two(nir_alu_instr *instr, unsigned src, unsigned num_components,
+is_pos_power_of_two(UNUSED struct hash_table *ht, nir_alu_instr *instr,
+ unsigned src, unsigned num_components,
const uint8_t *swizzle)
{
/* only constant srcs: */
}
static inline bool
-is_neg_power_of_two(nir_alu_instr *instr, unsigned src, unsigned num_components,
+is_neg_power_of_two(UNUSED struct hash_table *ht, nir_alu_instr *instr,
+ unsigned src, unsigned num_components,
const uint8_t *swizzle)
{
/* only constant srcs: */
}
static inline bool
-is_zero_to_one(nir_alu_instr *instr, unsigned src, unsigned num_components,
+is_zero_to_one(UNUSED struct hash_table *ht, nir_alu_instr *instr, unsigned src,
+ unsigned num_components,
const uint8_t *swizzle)
{
/* only constant srcs: */
* 1 while this function tests 0 < src < 1.
*/
static inline bool
-is_gt_0_and_lt_1(nir_alu_instr *instr, unsigned src, unsigned num_components,
+is_gt_0_and_lt_1(UNUSED struct hash_table *ht, nir_alu_instr *instr,
+ unsigned src, unsigned num_components,
const uint8_t *swizzle)
{
/* only constant srcs: */
}
static inline bool
-is_not_const_zero(nir_alu_instr *instr, unsigned src, unsigned num_components,
+is_not_const_zero(UNUSED struct hash_table *ht, nir_alu_instr *instr,
+ unsigned src, unsigned num_components,
const uint8_t *swizzle)
{
if (nir_src_as_const_value(instr->src[src].src) == NULL)
}
static inline bool
-is_not_const(nir_alu_instr *instr, unsigned src, UNUSED unsigned num_components,
+is_not_const(UNUSED struct hash_table *ht, nir_alu_instr *instr, unsigned src,
+ UNUSED unsigned num_components,
UNUSED const uint8_t *swizzle)
{
return !nir_src_is_const(instr->src[src].src);
}
static inline bool
-is_not_fmul(nir_alu_instr *instr, unsigned src,
+is_not_fmul(struct hash_table *ht, nir_alu_instr *instr, unsigned src,
UNUSED unsigned num_components, UNUSED const uint8_t *swizzle)
{
nir_alu_instr *src_alu =
return true;
if (src_alu->op == nir_op_fneg)
- return is_not_fmul(src_alu, 0, 0, NULL);
+ return is_not_fmul(ht, src_alu, 0, 0, NULL);
return src_alu->op != nir_op_fmul;
}
}
static inline bool
-is_not_const_and_not_fsign(nir_alu_instr *instr, unsigned src,
+is_not_const_and_not_fsign(struct hash_table *ht, nir_alu_instr *instr, unsigned src,
unsigned num_components, const uint8_t *swizzle)
{
- return is_not_const(instr, src, num_components, swizzle) &&
+ return is_not_const(ht, instr, src, num_components, swizzle) &&
!is_fsign(instr, src, num_components, swizzle);
}
* of all its components is zero.
*/
static inline bool
-is_upper_half_zero(nir_alu_instr *instr, unsigned src,
+is_upper_half_zero(UNUSED struct hash_table *ht,
+ nir_alu_instr *instr, unsigned src,
unsigned num_components, const uint8_t *swizzle)
{
if (nir_src_as_const_value(instr->src[src].src) == NULL)
* of all its components is zero.
*/
static inline bool
-is_lower_half_zero(nir_alu_instr *instr, unsigned src,
+is_lower_half_zero(UNUSED struct hash_table *ht,
+ nir_alu_instr *instr, unsigned src,
unsigned num_components, const uint8_t *swizzle)
{
if (nir_src_as_const_value(instr->src[src].src) == NULL)
}
static inline bool
-is_integral(nir_alu_instr *instr, unsigned src,
+is_integral(struct hash_table *ht, nir_alu_instr *instr, unsigned src,
UNUSED unsigned num_components, UNUSED const uint8_t *swizzle)
{
- const struct ssa_result_range r = nir_analyze_range(instr, src);
+ const struct ssa_result_range r = nir_analyze_range(ht, instr, src);
return r.is_integral;
}
#define RELATION(r) \
static inline bool \
-is_ ## r (nir_alu_instr *instr, unsigned src, \
+is_ ## r (struct hash_table *ht, nir_alu_instr *instr, unsigned src, \
UNUSED unsigned num_components, UNUSED const uint8_t *swizzle) \
{ \
- const struct ssa_result_range v = nir_analyze_range(instr, src); \
+ const struct ssa_result_range v = nir_analyze_range(ht, instr, src); \
return v.range == r; \
}
RELATION(ne_zero)
static inline bool
-is_not_negative(nir_alu_instr *instr, unsigned src,
+is_not_negative(struct hash_table *ht, nir_alu_instr *instr, unsigned src,
UNUSED unsigned num_components, UNUSED const uint8_t *swizzle)
{
- const struct ssa_result_range v = nir_analyze_range(instr, src);
+ const struct ssa_result_range v = nir_analyze_range(ht, instr, src);
return v.range == ge_zero || v.range == gt_zero || v.range == eq_zero;
}
static inline bool
-is_not_positive(nir_alu_instr *instr, unsigned src,
+is_not_positive(struct hash_table *ht, nir_alu_instr *instr, unsigned src,
UNUSED unsigned num_components, UNUSED const uint8_t *swizzle)
{
- const struct ssa_result_range v = nir_analyze_range(instr, src);
+ const struct ssa_result_range v = nir_analyze_range(ht, instr, src);
return v.range == le_zero || v.range == lt_zero || v.range == eq_zero;
}
static inline bool
-is_not_zero(nir_alu_instr *instr, unsigned src,
+is_not_zero(struct hash_table *ht, nir_alu_instr *instr, unsigned src,
UNUSED unsigned num_components, UNUSED const uint8_t *swizzle)
{
- const struct ssa_result_range v = nir_analyze_range(instr, src);
+ const struct ssa_result_range v = nir_analyze_range(ht, instr, src);
return v.range == lt_zero || v.range == gt_zero || v.range == ne_zero;
}