summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_search.h
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2018-10-22 14:08:13 -0500
committerJason Ekstrand <[email protected]>2018-10-26 11:45:29 -0500
commit4cd8a58595969e38254aeb0306b2408f80795700 (patch)
tree7396e7956b5f13b141cfc09e557f1bf143246e71 /src/compiler/nir/nir_search.h
parent6e32115bd673221420fbdf1500c60dcda402622d (diff)
nir/search: Use the nir_imm_* helpers from nir_builder
This requires that we rework the interface a bit to use nir_builder but that's a nice little modernization anyway. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_search.h')
-rw-r--r--src/compiler/nir/nir_search.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/compiler/nir/nir_search.h b/src/compiler/nir/nir_search.h
index 8b409541532..df4189ede74 100644
--- a/src/compiler/nir/nir_search.h
+++ b/src/compiler/nir/nir_search.h
@@ -32,6 +32,8 @@
#define NIR_SEARCH_MAX_VARIABLES 16
+struct nir_builder;
+
typedef enum {
nir_search_value_expression,
nir_search_value_variable,
@@ -123,8 +125,9 @@ NIR_DEFINE_CAST(nir_search_value_as_expression, nir_search_value,
nir_search_expression, value,
type, nir_search_value_expression)
-nir_alu_instr *
-nir_replace_instr(nir_alu_instr *instr, const nir_search_expression *search,
- const nir_search_value *replace, void *mem_ctx);
+nir_ssa_def *
+nir_replace_instr(struct nir_builder *b, nir_alu_instr *instr,
+ const nir_search_expression *search,
+ const nir_search_value *replace);
#endif /* _NIR_SEARCH_ */