diff options
Diffstat (limited to 'src/glsl/nir/nir.h')
-rw-r--r-- | src/glsl/nir/nir.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h index b9a17ed5fff..c48bde81c7b 100644 --- a/src/glsl/nir/nir.h +++ b/src/glsl/nir/nir.h @@ -420,6 +420,9 @@ typedef struct { /** generic SSA definition index. */ unsigned index; + /** Index into the live_in and live_out bitfields */ + unsigned live_index; + nir_instr *parent_instr; struct set *uses; @@ -999,6 +1002,10 @@ typedef struct nir_block { struct nir_block **dom_children; struct set *dom_frontier; + + /* live in and out for this block; used for liveness analysis */ + BITSET_WORD *live_in; + BITSET_WORD *live_out; } nir_block; #define nir_block_first_instr(block) \ @@ -1047,6 +1054,7 @@ typedef enum { nir_metadata_none = 0x0, nir_metadata_block_index = 0x1, nir_metadata_dominance = 0x2, + nir_metadata_live_variables = 0x4, } nir_metadata; typedef struct { @@ -1320,6 +1328,9 @@ void nir_lower_system_values(nir_shader *shader); void nir_lower_atomics(nir_shader *shader); +void nir_live_variables_impl(nir_function_impl *impl); +bool nir_ssa_defs_interfere(nir_ssa_def *a, nir_ssa_def *b); + void nir_convert_to_ssa_impl(nir_function_impl *impl); void nir_convert_to_ssa(nir_shader *shader); void nir_convert_from_ssa(nir_shader *shader); |