summaryrefslogtreecommitdiffstats
path: root/src/glsl/nir/nir.h
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-09-08 16:43:51 -0700
committerJason Ekstrand <[email protected]>2015-09-17 08:16:01 -0700
commit8ecaef967d6f2775bf7114d857baf3aaa13643a7 (patch)
tree215bdbecec7cfb27606a4a4ee8a0944cd0667c70 /src/glsl/nir/nir.h
parentbd016a2601a741799bc76734deae0cb9ebcb2b8f (diff)
nir: Add a generic instruction index
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/glsl/nir/nir.h')
-rw-r--r--src/glsl/nir/nir.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h
index 3a19bd34ef0..37d36822679 100644
--- a/src/glsl/nir/nir.h
+++ b/src/glsl/nir/nir.h
@@ -418,6 +418,9 @@ typedef struct nir_instr {
nir_instr_type type;
struct nir_block *block;
+ /** generic instruction index. */
+ unsigned index;
+
/* A temporary for optimization and analysis passes to use for storing
* flags. For instance, DCE uses this to store the "dead/live" info.
*/
@@ -1773,6 +1776,7 @@ nir_loop *nir_block_get_following_loop(nir_block *block);
void nir_index_local_regs(nir_function_impl *impl);
void nir_index_global_regs(nir_shader *shader);
void nir_index_ssa_defs(nir_function_impl *impl);
+unsigned nir_index_instrs(nir_function_impl *impl);
void nir_index_blocks(nir_function_impl *impl);