[Mesa-dev] [PATCH 3/6] nir: Expose function_impl versions of copy-prop and dce
Jason Ekstrand
jason at jlekstrand.net
Tue Dec 20 04:11:49 UTC 2016
---
src/compiler/nir/nir.h | 2 ++
src/compiler/nir/nir_opt_copy_propagate.c | 2 +-
src/compiler/nir/nir_opt_dce.c | 2 +-
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
index 0fd6a77..89b0c70 100644
--- a/src/compiler/nir/nir.h
+++ b/src/compiler/nir/nir.h
@@ -2545,10 +2545,12 @@ bool nir_opt_constant_folding(nir_shader *shader);
bool nir_opt_global_to_local(nir_shader *shader);
+bool nir_copy_prop_impl(nir_function_impl *impl);
bool nir_copy_prop(nir_shader *shader);
bool nir_opt_cse(nir_shader *shader);
+bool nir_opt_dce_impl(nir_function_impl *impl);
bool nir_opt_dce(nir_shader *shader);
bool nir_opt_dead_cf(nir_shader *shader);
diff --git a/src/compiler/nir/nir_opt_copy_propagate.c b/src/compiler/nir/nir_opt_copy_propagate.c
index c26e07f..3cd65a2 100644
--- a/src/compiler/nir/nir_opt_copy_propagate.c
+++ b/src/compiler/nir/nir_opt_copy_propagate.c
@@ -240,7 +240,7 @@ copy_prop_if(nir_if *if_stmt)
return copy_prop_src(&if_stmt->condition, NULL, if_stmt);
}
-static bool
+bool
nir_copy_prop_impl(nir_function_impl *impl)
{
bool progress = false;
diff --git a/src/compiler/nir/nir_opt_dce.c b/src/compiler/nir/nir_opt_dce.c
index 5cefba3..2d2ec29 100644
--- a/src/compiler/nir/nir_opt_dce.c
+++ b/src/compiler/nir/nir_opt_dce.c
@@ -128,7 +128,7 @@ init_block(nir_block *block, struct exec_list *worklist)
return true;
}
-static bool
+bool
nir_opt_dce_impl(nir_function_impl *impl)
{
struct exec_list *worklist = rzalloc(NULL, struct exec_list);
--
2.5.0.400.gff86faf
More information about the mesa-dev
mailing list