summaryrefslogtreecommitdiffstats
path: root/src/glsl/nir/nir.h
diff options
context:
space:
mode:
authorConnor Abbott <[email protected]>2014-07-24 15:51:58 -0700
committerJason Ekstrand <[email protected]>2015-01-15 07:18:58 -0800
commit7602385ac5c0e9935a69ec9f636fbbc392c55744 (patch)
tree2777025b68d85c84660173093dc8c3f406576b84 /src/glsl/nir/nir.h
parent8b7cb7674c735d83cd9a2b41e3d1f367353a20d4 (diff)
nir: add an SSA-based dead code elimination pass
v2: Jason Ekstrand <[email protected]>: whitespace fixes
Diffstat (limited to 'src/glsl/nir/nir.h')
-rw-r--r--src/glsl/nir/nir.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h
index c764aafdf15..1e708dfa985 100644
--- a/src/glsl/nir/nir.h
+++ b/src/glsl/nir/nir.h
@@ -397,6 +397,9 @@ typedef struct {
struct exec_node node;
nir_instr_type type;
struct nir_block *block;
+
+ /* flag for dead code elimination (see nir_opt_dce.c) */
+ bool live;
} nir_instr;
#define nir_instr_next(instr) \
@@ -1296,6 +1299,9 @@ 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_dce_impl(nir_function_impl *impl);
+bool nir_opt_dce(nir_shader *shader);
+
#ifdef __cplusplus
} /* extern "C" */
#endif