compiler/nir: add an is_conversion field to nir_op_info

This is set to True only for numeric conversion opcodes.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Iago Toral Quiroga
2019-02-12 12:55:28 +01:00
committed by Jason Ekstrand
parent 55e6454d5e
commit ca2b5e9069
3 changed files with 47 additions and 33 deletions
+1
View File
@@ -117,6 +117,7 @@ const nir_op_info nir_op_infos[nir_num_opcodes] = {
.input_types = {
${ ", ".join("nir_type_" + type for type in opcode.input_types) }
},
.is_conversion = ${"true" if opcode.is_conversion else "false"},
.algebraic_properties =
${ "0" if opcode.algebraic_properties == "" else " | ".join(
"NIR_OP_IS_" + prop.upper() for prop in