[Mesa-dev] [PATCH 03/20] nir: add a new nir_cf_list_clone_and_reinsert() helper
Timothy Arceri
tarceri at itsqueeze.com
Fri Dec 7 03:08:03 UTC 2018
Reviewed-by: Thomas Helland <thomashelland90 at gmail.com>
---
src/compiler/nir/nir_control_flow.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/compiler/nir/nir_control_flow.h b/src/compiler/nir/nir_control_flow.h
index 2ea460e5df..9111b30a29 100644
--- a/src/compiler/nir/nir_control_flow.h
+++ b/src/compiler/nir/nir_control_flow.h
@@ -145,6 +145,16 @@ void nir_cf_delete(nir_cf_list *cf_list);
void nir_cf_list_clone(nir_cf_list *dst, nir_cf_list *src, nir_cf_node *parent,
struct hash_table *remap_table);
+static inline void
+nir_cf_list_clone_and_reinsert(nir_cf_list *src_list, nir_cf_node *parent,
+ nir_cursor cursor,
+ struct hash_table *remap_table)
+{
+ nir_cf_list list;
+ nir_cf_list_clone(&list, src_list, parent, remap_table);
+ nir_cf_reinsert(&list, cursor);
+}
+
static inline void
nir_cf_list_extract(nir_cf_list *extracted, struct exec_list *cf_list)
{
--
2.19.2
More information about the mesa-dev
mailing list