mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 04:20:08 +01:00
nir: s/nir_instr_ssa_def/nir_instr_def/
Generated by sed:
sed -i -e 's/nir_instr_ssa_def/nir_instr_def/g' src/**/*.h src/**/*.c src/**/*.cpp
Suggested-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24703>
This commit is contained in:
parent
43be4129d2
commit
b64da56b1a
14 changed files with 31 additions and 31 deletions
|
|
@ -196,7 +196,7 @@ static bool ac_eliminate_duplicated_output(struct ac_out_info *outputs,
|
|||
sem.no_sysval_output = 1;
|
||||
|
||||
/* Write just one component. */
|
||||
prev_chan->store_intr = nir_store_output(b, nir_instr_ssa_def(cur_chan->value),
|
||||
prev_chan->store_intr = nir_store_output(b, nir_instr_def(cur_chan->value),
|
||||
nir_imm_int(b, 0),
|
||||
.base = prev->base,
|
||||
.component = i % 4,
|
||||
|
|
|
|||
|
|
@ -716,7 +716,7 @@ lower_hit_attribs(nir_shader *shader, nir_variable **hit_attribs, uint32_t workg
|
|||
ret = nir_load_var(&b, hit_attribs[nir_intrinsic_base(intrin)]);
|
||||
else
|
||||
ret = nir_load_shared(&b, 1, 32, offset, .base = 0, .align_mul = 4);
|
||||
nir_def_rewrite_uses(nir_instr_ssa_def(instr), ret);
|
||||
nir_def_rewrite_uses(nir_instr_def(instr), ret);
|
||||
} else {
|
||||
if (hit_attribs)
|
||||
nir_store_var(&b, hit_attribs[nir_intrinsic_base(intrin)], intrin->src->ssa, 0x1);
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ rewrite_cost(nir_def *def, const void *data)
|
|||
static bool
|
||||
avoid_instr(const nir_instr *instr, const void *data)
|
||||
{
|
||||
const nir_def *def = nir_instr_ssa_def((nir_instr *)instr);
|
||||
const nir_def *def = nir_instr_def((nir_instr *)instr);
|
||||
|
||||
/* Do not move bindless handles, since we need those to retain their constant
|
||||
* base index.
|
||||
|
|
|
|||
|
|
@ -1286,7 +1286,7 @@ nir_instr_free_and_dce(nir_instr *instr)
|
|||
/*@}*/
|
||||
|
||||
nir_def *
|
||||
nir_instr_ssa_def(nir_instr *instr)
|
||||
nir_instr_def(nir_instr *instr)
|
||||
{
|
||||
switch (instr->type) {
|
||||
case nir_instr_type_alu:
|
||||
|
|
@ -2038,7 +2038,7 @@ nir_function_impl_lower_instructions(nir_function_impl *impl,
|
|||
continue;
|
||||
}
|
||||
|
||||
nir_def *old_def = nir_instr_ssa_def(instr);
|
||||
nir_def *old_def = nir_instr_def(instr);
|
||||
struct list_head old_uses;
|
||||
if (old_def != NULL) {
|
||||
/* We're about to ask the callback to generate a replacement for instr.
|
||||
|
|
|
|||
|
|
@ -4349,7 +4349,7 @@ nir_cursor nir_instr_free_and_dce(nir_instr *instr);
|
|||
|
||||
/** @} */
|
||||
|
||||
nir_def *nir_instr_ssa_def(nir_instr *instr);
|
||||
nir_def *nir_instr_def(nir_instr *instr);
|
||||
|
||||
typedef bool (*nir_foreach_def_cb)(nir_def *def, void *state);
|
||||
typedef bool (*nir_foreach_src_cb)(nir_src *src, void *state);
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ group_loads(nir_instr *first, nir_instr *last)
|
|||
if (!can_move(instr, first->pass_flags))
|
||||
continue;
|
||||
|
||||
nir_def *def = nir_instr_ssa_def(instr);
|
||||
nir_def *def = nir_instr_def(instr);
|
||||
if (def) {
|
||||
bool all_uses_after_last = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ lower_cube_size(nir_builder *b, nir_intrinsic_instr *intrin)
|
|||
nir_intrinsic_set_image_array(_2darray_size, true);
|
||||
nir_builder_instr_insert(b, &_2darray_size->instr);
|
||||
|
||||
nir_def *size = nir_instr_ssa_def(&_2darray_size->instr);
|
||||
nir_def *size = nir_instr_def(&_2darray_size->instr);
|
||||
nir_scalar comps[NIR_MAX_VEC_COMPONENTS] = { 0 };
|
||||
unsigned coord_comps = intrin->def.num_components;
|
||||
for (unsigned c = 0; c < coord_comps; c++) {
|
||||
|
|
|
|||
|
|
@ -283,7 +283,7 @@ can_remat_chain_ssa_def(nir_def *def, struct sized_bitset *remat, struct util_dy
|
|||
memcpy(potential_remat.set, remat->set, BITSET_WORDS(remat->size) * sizeof(BITSET_WORD));
|
||||
|
||||
util_dynarray_foreach(buf, nir_instr *, instr_ptr) {
|
||||
nir_def *instr_ssa_def = nir_instr_ssa_def(*instr_ptr);
|
||||
nir_def *instr_ssa_def = nir_instr_def(*instr_ptr);
|
||||
|
||||
/* If already in the potential rematerializable, nothing to do. */
|
||||
if (BITSET_TEST(potential_remat.set, instr_ssa_def->index))
|
||||
|
|
@ -313,7 +313,7 @@ remat_ssa_def(nir_builder *b, nir_def *def, struct hash_table *remap_table)
|
|||
{
|
||||
nir_instr *clone = nir_instr_clone_deep(b->shader, def->parent_instr, remap_table);
|
||||
nir_builder_instr_insert(b, clone);
|
||||
return nir_instr_ssa_def(clone);
|
||||
return nir_instr_def(clone);
|
||||
}
|
||||
|
||||
static nir_def *
|
||||
|
|
@ -324,7 +324,7 @@ remat_chain_ssa_def(nir_builder *b, struct util_dynarray *buf,
|
|||
nir_def *last_def = NULL;
|
||||
|
||||
util_dynarray_foreach(buf, nir_instr *, instr_ptr) {
|
||||
nir_def *instr_ssa_def = nir_instr_ssa_def(*instr_ptr);
|
||||
nir_def *instr_ssa_def = nir_instr_def(*instr_ptr);
|
||||
unsigned ssa_index = instr_ssa_def->index;
|
||||
|
||||
if (fill_defs[ssa_index] != NULL &&
|
||||
|
|
@ -522,7 +522,7 @@ spill_ssa_defs_and_lower_shader_calls(nir_shader *shader, uint32_t num_calls,
|
|||
|
||||
nir_foreach_block(block, impl) {
|
||||
nir_foreach_instr(instr, block) {
|
||||
nir_def *def = nir_instr_ssa_def(instr);
|
||||
nir_def *def = nir_instr_def(instr);
|
||||
if (def == NULL)
|
||||
continue;
|
||||
|
||||
|
|
@ -559,7 +559,7 @@ spill_ssa_defs_and_lower_shader_calls(nir_shader *shader, uint32_t num_calls,
|
|||
unsigned max_scratch_size = shader->scratch_size;
|
||||
nir_foreach_block(block, impl) {
|
||||
nir_foreach_instr_safe(instr, block) {
|
||||
nir_def *def = nir_instr_ssa_def(instr);
|
||||
nir_def *def = nir_instr_def(instr);
|
||||
if (def != NULL) {
|
||||
if (can_remat_ssa_def(def, &trivial_remat)) {
|
||||
add_ssa_def_to_bitset(def, &trivial_remat);
|
||||
|
|
@ -735,7 +735,7 @@ spill_ssa_defs_and_lower_shader_calls(nir_shader *shader, uint32_t num_calls,
|
|||
*/
|
||||
nir_foreach_block(block, impl) {
|
||||
nir_foreach_instr_safe(instr, block) {
|
||||
nir_def *def = nir_instr_ssa_def(instr);
|
||||
nir_def *def = nir_instr_def(instr);
|
||||
if (def != NULL) {
|
||||
struct nir_phi_builder_value *pbv =
|
||||
get_phi_builder_value_for_def(def, &pbv_arr);
|
||||
|
|
@ -1044,7 +1044,7 @@ flatten_resume_if_ladder(nir_builder *b,
|
|||
nir_instr_insert(b->cursor, instr);
|
||||
b->cursor = nir_after_instr(instr);
|
||||
|
||||
nir_def *def = nir_instr_ssa_def(instr);
|
||||
nir_def *def = nir_instr_def(instr);
|
||||
BITSET_SET(remat->set, def->index);
|
||||
}
|
||||
}
|
||||
|
|
@ -1342,7 +1342,7 @@ lower_stack_instr_to_scratch(struct nir_builder *b, nir_instr *instr, void *data
|
|||
switch (stack->intrinsic) {
|
||||
case nir_intrinsic_load_stack: {
|
||||
b->cursor = nir_instr_remove(instr);
|
||||
nir_def *data, *old_data = nir_instr_ssa_def(instr);
|
||||
nir_def *data, *old_data = nir_instr_def(instr);
|
||||
|
||||
if (state->address_format == nir_address_format_64bit_global) {
|
||||
nir_def *addr = nir_iadd_imm(b,
|
||||
|
|
@ -1484,7 +1484,7 @@ nir_opt_trim_stack_values(nir_shader *shader)
|
|||
const unsigned value_id = nir_intrinsic_value_id(intrin);
|
||||
|
||||
const unsigned mask =
|
||||
nir_def_components_read(nir_instr_ssa_def(instr));
|
||||
nir_def_components_read(nir_instr_def(instr));
|
||||
add_use_mask(value_id_to_mask, value_id, mask);
|
||||
}
|
||||
}
|
||||
|
|
@ -1555,7 +1555,7 @@ nir_opt_trim_stack_values(nir_shader *shader)
|
|||
u_foreach_bit(idx, read_mask)
|
||||
swiz_map[idx] = swiz_count++;
|
||||
|
||||
nir_def *def = nir_instr_ssa_def(instr);
|
||||
nir_def *def = nir_instr_def(instr);
|
||||
|
||||
nir_foreach_use_safe(use_src, def) {
|
||||
if (use_src->parent_instr->type == nir_instr_type_alu) {
|
||||
|
|
@ -1652,7 +1652,7 @@ nir_opt_sort_and_pack_stack(nir_shader *shader,
|
|||
continue;
|
||||
|
||||
const unsigned value_id = nir_intrinsic_value_id(intrin);
|
||||
nir_def *def = nir_instr_ssa_def(instr);
|
||||
nir_def *def = nir_instr_def(instr);
|
||||
|
||||
assert(_mesa_hash_table_u64_search(value_id_to_item,
|
||||
value_id) == NULL);
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ nir_opt_move_block(nir_block *block, nir_move_options options)
|
|||
continue;
|
||||
|
||||
/* Check all users in this block which is the first */
|
||||
const nir_def *def = nir_instr_ssa_def(instr);
|
||||
const nir_def *def = nir_instr_def(instr);
|
||||
nir_instr *first_user = instr == if_cond_instr ? NULL : last_instr;
|
||||
nir_foreach_use(use, def) {
|
||||
nir_instr *parent = use->parent_instr;
|
||||
|
|
|
|||
|
|
@ -355,7 +355,7 @@ nir_opt_preamble(nir_shader *shader, const nir_opt_preamble_options *options,
|
|||
/* Step 1: Calculate can_move */
|
||||
nir_foreach_block(block, impl) {
|
||||
nir_foreach_instr(instr, block) {
|
||||
nir_def *def = nir_instr_ssa_def(instr);
|
||||
nir_def *def = nir_instr_def(instr);
|
||||
if (!def)
|
||||
continue;
|
||||
|
||||
|
|
@ -381,7 +381,7 @@ nir_opt_preamble(nir_shader *shader, const nir_opt_preamble_options *options,
|
|||
unsigned num_candidates = 0;
|
||||
nir_foreach_block_reverse(block, impl) {
|
||||
nir_foreach_instr_reverse(instr, block) {
|
||||
nir_def *def = nir_instr_ssa_def(instr);
|
||||
nir_def *def = nir_instr_def(instr);
|
||||
if (!def)
|
||||
continue;
|
||||
|
||||
|
|
@ -394,7 +394,7 @@ nir_opt_preamble(nir_shader *shader, const nir_opt_preamble_options *options,
|
|||
state->candidate = false;
|
||||
state->must_stay = false;
|
||||
nir_foreach_use(use, def) {
|
||||
nir_def *use_def = nir_instr_ssa_def(use->parent_instr);
|
||||
nir_def *use_def = nir_instr_def(use->parent_instr);
|
||||
if (!use_def || !ctx.states[use_def->index].can_move ||
|
||||
ctx.states[use_def->index].must_stay) {
|
||||
if (is_candidate)
|
||||
|
|
@ -441,7 +441,7 @@ nir_opt_preamble(nir_shader *shader, const nir_opt_preamble_options *options,
|
|||
*/
|
||||
nir_foreach_block(block, impl) {
|
||||
nir_foreach_instr(instr, block) {
|
||||
nir_def *def = nir_instr_ssa_def(instr);
|
||||
nir_def *def = nir_instr_def(instr);
|
||||
if (!def)
|
||||
continue;
|
||||
|
||||
|
|
@ -527,7 +527,7 @@ nir_opt_preamble(nir_shader *shader, const nir_opt_preamble_options *options,
|
|||
|
||||
nir_foreach_block(block, impl) {
|
||||
nir_foreach_instr(instr, block) {
|
||||
nir_def *def = nir_instr_ssa_def(instr);
|
||||
nir_def *def = nir_instr_def(instr);
|
||||
if (!def)
|
||||
continue;
|
||||
|
||||
|
|
@ -560,7 +560,7 @@ nir_opt_preamble(nir_shader *shader, const nir_opt_preamble_options *options,
|
|||
}
|
||||
|
||||
if (state->replace) {
|
||||
nir_def *clone_def = nir_instr_ssa_def(clone);
|
||||
nir_def *clone_def = nir_instr_def(clone);
|
||||
nir_store_preamble(b, clone_def, .base = state->offset);
|
||||
}
|
||||
}
|
||||
|
|
@ -571,7 +571,7 @@ nir_opt_preamble(nir_shader *shader, const nir_opt_preamble_options *options,
|
|||
|
||||
nir_foreach_block(block, impl) {
|
||||
nir_foreach_instr_safe(instr, block) {
|
||||
nir_def *def = nir_instr_ssa_def(instr);
|
||||
nir_def *def = nir_instr_def(instr);
|
||||
if (!def)
|
||||
continue;
|
||||
|
||||
|
|
|
|||
|
|
@ -211,7 +211,7 @@ nir_opt_sink(nir_shader *shader, nir_move_options options)
|
|||
if (!nir_can_move_instr(instr, options))
|
||||
continue;
|
||||
|
||||
nir_def *def = nir_instr_ssa_def(instr);
|
||||
nir_def *def = nir_instr_def(instr);
|
||||
|
||||
bool sink_out_of_loops =
|
||||
instr->type != nir_instr_type_intrinsic ||
|
||||
|
|
|
|||
|
|
@ -619,7 +619,7 @@ add_uses_to_worklist(nir_instr *instr,
|
|||
struct util_dynarray *states,
|
||||
const struct per_op_table *pass_op_table)
|
||||
{
|
||||
nir_def *def = nir_instr_ssa_def(instr);
|
||||
nir_def *def = nir_instr_def(instr);
|
||||
|
||||
nir_foreach_use_safe(use_src, def) {
|
||||
if (nir_algebraic_automaton(use_src->parent_instr, states, pass_op_table))
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ lower_pos_read(nir_builder *b, struct nir_instr *instr,
|
|||
|
||||
b->cursor = nir_after_instr(instr);
|
||||
|
||||
nir_def *pos = nir_instr_ssa_def(instr);
|
||||
nir_def *pos = nir_instr_def(instr);
|
||||
nir_def *depth = nir_channel(b, pos, 2);
|
||||
|
||||
assert(depth_transform_var);
|
||||
|
|
|
|||
|
|
@ -304,7 +304,7 @@ clc_lower_64bit_semantics(nir_shader *nir)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (nir_instr_ssa_def(instr)->bit_size != 64)
|
||||
if (nir_instr_def(instr)->bit_size != 64)
|
||||
continue;
|
||||
|
||||
intrinsic->def.bit_size = 32;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue