def->index = impl->ssa_alloc++;
- impl->valid_metadata &= ~nir_metadata_live_ssa_defs;
+ impl->valid_metadata &= ~nir_metadata_live_defs;
}
return true;
def->index = impl->ssa_alloc++;
- impl->valid_metadata &= ~nir_metadata_live_ssa_defs;
+ impl->valid_metadata &= ~nir_metadata_live_defs;
} else {
def->index = UINT_MAX;
}
{
unsigned index = 0;
- impl->valid_metadata &= ~nir_metadata_live_ssa_defs;
+ impl->valid_metadata &= ~nir_metadata_live_defs;
nir_foreach_block_unstructured(block, impl) {
nir_foreach_instr(instr, block)
* SSA defs or uses of SSA defs (most passes shouldn't preserve this
* metadata type).
*/
- nir_metadata_live_ssa_defs = 0x4,
+ nir_metadata_live_defs = 0x4,
/** A dummy metadata value to track when a pass forgot to call
* nir_metadata_preserve.
bool nir_shader_supports_implicit_lod(nir_shader *shader);
-void nir_live_ssa_defs_impl(nir_function_impl *impl);
+void nir_live_defs_impl(nir_function_impl *impl);
-const BITSET_WORD *nir_get_live_ssa_defs(nir_cursor cursor, void *mem_ctx);
+const BITSET_WORD *nir_get_live_defs(nir_cursor cursor, void *mem_ctx);
void nir_loop_analyze_impl(nir_function_impl *impl,
nir_variable_mode indirect_mask,
nir_shader_instructions_pass(shader, nir_fixup_deref_modes_instr,
nir_metadata_block_index |
nir_metadata_dominance |
- nir_metadata_live_ssa_defs |
+ nir_metadata_live_defs |
nir_metadata_instr_index,
NULL);
}
nir_metadata_dominance);
nir_metadata_require(impl, nir_metadata_instr_index |
- nir_metadata_live_ssa_defs |
+ nir_metadata_live_defs |
nir_metadata_dominance);
nir_foreach_block(block, impl) {
* block but not in the live-in of the block containing the phi node.
*/
-struct live_ssa_defs_state {
+struct live_defs_state {
unsigned bitset_words;
/* Used in propagate_across_edge() */
*/
static void
init_liveness_block(nir_block *block,
- struct live_ssa_defs_state *state)
+ struct live_defs_state *state)
{
block->live_in = reralloc(block, block->live_in, BITSET_WORD,
state->bitset_words);
*/
static bool
propagate_across_edge(nir_block *pred, nir_block *succ,
- struct live_ssa_defs_state *state)
+ struct live_defs_state *state)
{
BITSET_WORD *live = state->tmp_live;
memcpy(live, succ->live_in, state->bitset_words * sizeof *live);
}
void
-nir_live_ssa_defs_impl(nir_function_impl *impl)
+nir_live_defs_impl(nir_function_impl *impl)
{
- struct live_ssa_defs_state state = {
+ struct live_defs_state state = {
.bitset_words = BITSET_WORDS(impl->ssa_alloc),
};
state.tmp_live = rzalloc_array(impl, BITSET_WORD, state.bitset_words),
* instead, provide a mem_ctx and free that.
*/
const BITSET_WORD *
-nir_get_live_ssa_defs(nir_cursor cursor, void *mem_ctx)
+nir_get_live_defs(nir_cursor cursor, void *mem_ctx)
{
nir_block *block = nir_cursor_current_block(cursor);
nir_function_impl *impl = nir_cf_node_get_function(&block->cf_node);
- assert(impl->valid_metadata & nir_metadata_live_ssa_defs);
+ assert(impl->valid_metadata & nir_metadata_live_defs);
switch (cursor.option) {
case nir_cursor_before_block:
nir_metadata_preserve(impl,
nir_metadata_block_index |
nir_metadata_dominance |
- nir_metadata_live_ssa_defs |
+ nir_metadata_live_defs |
nir_metadata_loop_analysis);
} else {
nir_metadata_preserve(impl, nir_metadata_all);
nir_lower_discard_to_demote_instr,
nir_metadata_block_index |
nir_metadata_dominance |
- nir_metadata_live_ssa_defs |
+ nir_metadata_live_defs |
nir_metadata_instr_index,
NULL);
shader->info.fs.uses_demote = true;
exec_list_push_tail(&impl->locals, &var->node);
nir_metadata_preserve(impl, nir_metadata_block_index |
nir_metadata_dominance |
- nir_metadata_live_ssa_defs);
+ nir_metadata_live_defs);
progress = true;
}
}
if (progress) {
nir_metadata_preserve(impl, nir_metadata_block_index |
nir_metadata_dominance |
- nir_metadata_live_ssa_defs |
+ nir_metadata_live_defs |
nir_metadata_loop_analysis);
} else {
nir_metadata_preserve(impl, nir_metadata_all);
*/
nir_function_impl *impl = nir_shader_get_entrypoint(shader);
- nir_metadata_require(impl, nir_metadata_live_ssa_defs |
+ nir_metadata_require(impl, nir_metadata_live_defs |
nir_metadata_dominance |
nir_metadata_block_index |
nir_metadata_instr_index);
* TODO: This isn't quite true for report_intersection.
*/
call_live[call_idx] =
- nir_get_live_ssa_defs(nir_after_instr(instr), mem_ctx);
+ nir_get_live_defs(nir_after_instr(instr), mem_ctx);
call_idx++;
}
progress = true;
nir_metadata_preserve(impl, nir_metadata_block_index |
nir_metadata_dominance |
- nir_metadata_live_ssa_defs);
+ nir_metadata_live_defs);
} else {
nir_metadata_preserve(impl, nir_metadata_all);
}
nir_index_instrs(impl);
if (NEEDS_UPDATE(nir_metadata_dominance))
nir_calc_dominance_impl(impl);
- if (NEEDS_UPDATE(nir_metadata_live_ssa_defs))
- nir_live_ssa_defs_impl(impl);
+ if (NEEDS_UPDATE(nir_metadata_live_defs))
+ nir_live_defs_impl(impl);
if (NEEDS_UPDATE(nir_metadata_loop_analysis)) {
va_list ap;
va_start(ap, required);
nir_metadata_preserve(impl,
nir_metadata_block_index |
nir_metadata_dominance |
- nir_metadata_live_ssa_defs |
+ nir_metadata_live_defs |
nir_metadata_loop_analysis);
}
nir_metadata_preserve(impl,
nir_metadata_block_index |
nir_metadata_dominance |
- nir_metadata_live_ssa_defs |
+ nir_metadata_live_defs |
nir_metadata_loop_analysis);
}
}
if (progress) {
nir_metadata_preserve(impl, nir_metadata_block_index |
nir_metadata_dominance |
- nir_metadata_live_ssa_defs);
+ nir_metadata_live_defs);
} else {
nir_metadata_preserve(impl, nir_metadata_all);
}
nir_metadata_preserve(impl,
nir_metadata_block_index |
nir_metadata_dominance |
- nir_metadata_live_ssa_defs);
+ nir_metadata_live_defs);
}
ralloc_free(ctx);
if (impl_progress) {
nir_metadata_preserve(impl, nir_metadata_block_index |
nir_metadata_dominance |
- nir_metadata_live_ssa_defs);
+ nir_metadata_live_defs);
progress = true;
} else {
nir_metadata_preserve(impl, nir_metadata_all);
if (progress) {
nir_metadata_preserve(impl, nir_metadata_block_index |
nir_metadata_dominance |
- nir_metadata_live_ssa_defs);
+ nir_metadata_live_defs);
} else {
nir_metadata_preserve(impl, nir_metadata_all);
}
nir_foreach_function_impl(impl, nir) {
nir_metadata_preserve(impl, nir_metadata_block_index |
nir_metadata_dominance |
- nir_metadata_live_ssa_defs |
+ nir_metadata_live_defs |
nir_metadata_loop_analysis);
}
nir_foreach_function_impl(impl, nir) {
nir_metadata_preserve(impl, nir_metadata_block_index |
nir_metadata_dominance |
- nir_metadata_live_ssa_defs |
+ nir_metadata_live_defs |
nir_metadata_loop_analysis);
}
brw_nir_blockify_uniform_loads_instr,
nir_metadata_block_index |
nir_metadata_dominance |
- nir_metadata_live_ssa_defs,
+ nir_metadata_live_defs,
(void *) devinfo);
}