diff options
author | Samuel Pitoiset <[email protected]> | 2018-05-30 14:21:41 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2018-06-04 12:41:08 +0200 |
commit | e44f90eccfaec2a1b1e813f93497bb498181dd2f (patch) | |
tree | 768040b4a25ecebebe4b5322e0c0b4ae62b93858 /src/compiler/nir/nir_opt_move_comparisons.c | |
parent | 67eccd6aa2b3fcc79a232479a58a0f52b9980001 (diff) |
nir: make is_comparison() a non-static helper function
Rename and change the prototype for consistency regarding
nir_tex_instr_is_query(). This function will be used in the
following patch.
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_opt_move_comparisons.c')
-rw-r--r-- | src/compiler/nir/nir_opt_move_comparisons.c | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/src/compiler/nir/nir_opt_move_comparisons.c b/src/compiler/nir/nir_opt_move_comparisons.c index 617c2ca9989..5da57dc9213 100644 --- a/src/compiler/nir/nir_opt_move_comparisons.c +++ b/src/compiler/nir/nir_opt_move_comparisons.c @@ -51,30 +51,6 @@ */ static bool -is_comparison(nir_op op) -{ - switch (op) { - case nir_op_flt: - case nir_op_fge: - case nir_op_feq: - case nir_op_fne: - case nir_op_ilt: - case nir_op_ult: - case nir_op_ige: - case nir_op_uge: - case nir_op_ieq: - case nir_op_ine: - case nir_op_i2b: - case nir_op_f2b: - case nir_op_inot: - case nir_op_fnot: - return true; - default: - return false; - } -} - -static bool move_comparison_source(nir_src *src, nir_block *block, nir_instr *before) { if (!src->is_ssa) @@ -84,7 +60,7 @@ move_comparison_source(nir_src *src, nir_block *block, nir_instr *before) if (src_instr->block == block && src_instr->type == nir_instr_type_alu && - is_comparison(nir_instr_as_alu(src_instr)->op)) { + nir_alu_instr_is_comparison(nir_instr_as_alu(src_instr))) { exec_node_remove(&src_instr->node); |