diff options
Diffstat (limited to 'src/compiler/nir/nir_search.h')
-rw-r--r-- | src/compiler/nir/nir_search.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_search.h b/src/compiler/nir/nir_search.h index dec19d53df7..8b409541532 100644 --- a/src/compiler/nir/nir_search.h +++ b/src/compiler/nir/nir_search.h @@ -103,6 +103,14 @@ typedef struct { nir_op opcode; const nir_search_value *srcs[4]; + + /** Optional condition fxn ptr + * + * This allows additional constraints on expression matching, it is + * typically used to match an expressions uses such as the number of times + * the expression is used, and whether its used by an if. + */ + bool (*cond)(nir_alu_instr *instr); } nir_search_expression; NIR_DEFINE_CAST(nir_search_value_as_variable, nir_search_value, |