Module: Mesa Branch: main Commit: 7e42fdac6b29b33e63904167f07011f40e4ba538 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7e42fdac6b29b33e63904167f07011f40e4ba538
Author: Alyssa Rosenzweig <[email protected]> Date: Fri Jun 16 11:10:25 2023 -0400 nir: Rename nir_reg_{src,dest} -> nir_register_{src,dest} This frees up the shorter names for the intrinsic-based versions that will replace them. Signed-off-by: Alyssa Rosenzweig <[email protected]> Acked-by: Caio Oliveira <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23956> --- src/compiler/nir/nir.h | 8 ++++---- src/compiler/nir/nir_print.c | 4 ++-- src/compiler/nir/nir_validate.c | 2 +- src/gallium/auxiliary/gallivm/lp_bld_nir.c | 4 ++-- src/gallium/auxiliary/gallivm/lp_bld_nir.h | 4 ++-- src/gallium/auxiliary/gallivm/lp_bld_nir_aos.c | 4 ++-- src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c | 4 ++-- src/gallium/drivers/lima/ir/gp/nir.c | 2 +- src/gallium/drivers/r600/sfn/sfn_valuefactory.cpp | 4 ++-- src/gallium/drivers/r600/sfn/sfn_valuefactory.h | 4 ++-- src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c | 4 ++-- 11 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 13a4b9470e2..0e30adea2c5 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -989,7 +989,7 @@ typedef struct { nir_register *reg; struct nir_src *indirect; /** < NULL for no indirect offset */ unsigned base_offset; -} nir_reg_src; +} nir_register_src; typedef struct { nir_instr *parent_instr; @@ -998,7 +998,7 @@ typedef struct { nir_register *reg; struct nir_src *indirect; /** < NULL for no indirect offset */ unsigned base_offset; -} nir_reg_dest; +} nir_register_dest; struct nir_if; @@ -1012,7 +1012,7 @@ typedef struct nir_src { struct list_head use_link; union { - nir_reg_src reg; + nir_register_src reg; nir_ssa_def *ssa; }; @@ -1076,7 +1076,7 @@ nir_ssa_def_used_by_if(const nir_ssa_def *def) typedef struct { union { - nir_reg_dest reg; + nir_register_dest reg; nir_ssa_def ssa; }; diff --git a/src/compiler/nir/nir_print.c b/src/compiler/nir/nir_print.c index d18198f8110..d21c99f3227 100644 --- a/src/compiler/nir/nir_print.c +++ b/src/compiler/nir/nir_print.c @@ -359,7 +359,7 @@ print_ssa_use(nir_ssa_def *def, print_state *state, nir_alu_type src_type) static void print_src(const nir_src *src, print_state *state, nir_alu_type src_type); static void -print_reg_src(const nir_reg_src *src, print_state *state) +print_reg_src(const nir_register_src *src, print_state *state) { FILE *fp = state->fp; print_register(src->reg, state); @@ -374,7 +374,7 @@ print_reg_src(const nir_reg_src *src, print_state *state) } static void -print_reg_dest(nir_reg_dest *dest, print_state *state) +print_reg_dest(nir_register_dest *dest, print_state *state) { FILE *fp = state->fp; fprintf(fp, "%s", divergence_status(state, dest->reg->divergent)); diff --git a/src/compiler/nir/nir_validate.c b/src/compiler/nir/nir_validate.c index 3ac014d1dc3..8881aa1461a 100644 --- a/src/compiler/nir/nir_validate.c +++ b/src/compiler/nir/nir_validate.c @@ -247,7 +247,7 @@ validate_alu_src(nir_alu_instr *instr, unsigned index, validate_state *state) } static void -validate_reg_dest(nir_reg_dest *dest, validate_state *state, +validate_reg_dest(nir_register_dest *dest, validate_state *state, unsigned bit_sizes, unsigned num_components) { validate_assert(state, dest->reg != NULL); diff --git a/src/gallium/auxiliary/gallivm/lp_bld_nir.c b/src/gallium/auxiliary/gallivm/lp_bld_nir.c index 6c6596ce0ca..108907ca494 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_nir.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_nir.c @@ -161,7 +161,7 @@ get_src(struct lp_build_nir_context *bld_base, nir_src src); static LLVMValueRef -get_reg_src(struct lp_build_nir_context *bld_base, nir_reg_src src) +get_reg_src(struct lp_build_nir_context *bld_base, nir_register_src src) { struct hash_entry *entry = _mesa_hash_table_search(bld_base->regs, src.reg); LLVMValueRef reg_storage = (LLVMValueRef)entry->data; @@ -205,7 +205,7 @@ assign_ssa_dest(struct lp_build_nir_context *bld_base, const nir_ssa_def *ssa, static void -assign_reg(struct lp_build_nir_context *bld_base, const nir_reg_dest *reg, +assign_reg(struct lp_build_nir_context *bld_base, const nir_register_dest *reg, unsigned write_mask, LLVMValueRef vals[NIR_MAX_VEC_COMPONENTS]) { diff --git a/src/gallium/auxiliary/gallivm/lp_bld_nir.h b/src/gallium/auxiliary/gallivm/lp_bld_nir.h index 8884c9e6bd5..8de93056c72 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_nir.h +++ b/src/gallium/auxiliary/gallivm/lp_bld_nir.h @@ -161,12 +161,12 @@ struct lp_build_nir_context LLVMValueRef (*load_reg)(struct lp_build_nir_context *bld_base, struct lp_build_context *reg_bld, - const nir_reg_src *reg, + const nir_register_src *reg, LLVMValueRef indir_src, LLVMValueRef reg_storage); void (*store_reg)(struct lp_build_nir_context *bld_base, struct lp_build_context *reg_bld, - const nir_reg_dest *reg, + const nir_register_dest *reg, unsigned writemask, LLVMValueRef indir_src, LLVMValueRef reg_storage, diff --git a/src/gallium/auxiliary/gallivm/lp_bld_nir_aos.c b/src/gallium/auxiliary/gallivm/lp_bld_nir_aos.c index 36a2304a04d..50c41448cb2 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_nir_aos.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_nir_aos.c @@ -162,7 +162,7 @@ emit_store_var(struct lp_build_nir_context *bld_base, static LLVMValueRef emit_load_reg(struct lp_build_nir_context *bld_base, struct lp_build_context *reg_bld, - const nir_reg_src *reg, + const nir_register_src *reg, LLVMValueRef indir_src, LLVMValueRef reg_storage) { @@ -205,7 +205,7 @@ swizzle_writemask(struct lp_build_nir_aos_context *bld, static void emit_store_reg(struct lp_build_nir_context *bld_base, struct lp_build_context *reg_bld, - const nir_reg_dest *reg, + const nir_register_dest *reg, unsigned writemask, LLVMValueRef indir_src, LLVMValueRef reg_storage, diff --git a/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c index b7d7a7e4414..609c06a5ca0 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c @@ -853,7 +853,7 @@ static LLVMValueRef reg_chan_pointer(struct lp_build_nir_context *bld_base, static LLVMValueRef emit_load_reg(struct lp_build_nir_context *bld_base, struct lp_build_context *reg_bld, - const nir_reg_src *reg, + const nir_register_src *reg, LLVMValueRef indir_src, LLVMValueRef reg_storage) { @@ -884,7 +884,7 @@ static LLVMValueRef emit_load_reg(struct lp_build_nir_context *bld_base, static void emit_store_reg(struct lp_build_nir_context *bld_base, struct lp_build_context *reg_bld, - const nir_reg_dest *reg, + const nir_register_dest *reg, unsigned writemask, LLVMValueRef indir_src, LLVMValueRef reg_storage, diff --git a/src/gallium/drivers/lima/ir/gp/nir.c b/src/gallium/drivers/lima/ir/gp/nir.c index 32923a98899..87695ac796d 100644 --- a/src/gallium/drivers/lima/ir/gp/nir.c +++ b/src/gallium/drivers/lima/ir/gp/nir.c @@ -85,7 +85,7 @@ static void register_node_ssa(gpir_block *block, gpir_node *node, nir_ssa_def *s } } -static void register_node_reg(gpir_block *block, gpir_node *node, nir_reg_dest *nir_reg) +static void register_node_reg(gpir_block *block, gpir_node *node, nir_register_dest *nir_reg) { block->comp->node_for_reg[nir_reg->reg->index] = node; gpir_store_node *store = gpir_node_create(block, gpir_op_store_reg); diff --git a/src/gallium/drivers/r600/sfn/sfn_valuefactory.cpp b/src/gallium/drivers/r600/sfn/sfn_valuefactory.cpp index f36279e69f5..ce12ff7376d 100644 --- a/src/gallium/drivers/r600/sfn/sfn_valuefactory.cpp +++ b/src/gallium/drivers/r600/sfn/sfn_valuefactory.cpp @@ -491,13 +491,13 @@ ValueFactory::ssa_src(const nir_ssa_def& ssa, int chan) } PRegister -ValueFactory::local_register(const nir_reg_dest& dst, int chan) +ValueFactory::local_register(const nir_register_dest& dst, int chan) { return resolve_array(dst.reg, dst.indirect, dst.base_offset, chan); } PRegister -ValueFactory::local_register(const nir_reg_src& src, int chan) +ValueFactory::local_register(const nir_register_src& src, int chan) { return resolve_array(src.reg, src.indirect, src.base_offset, chan); } diff --git a/src/gallium/drivers/r600/sfn/sfn_valuefactory.h b/src/gallium/drivers/r600/sfn/sfn_valuefactory.h index ae2840c390e..5391af3b408 100644 --- a/src/gallium/drivers/r600/sfn/sfn_valuefactory.h +++ b/src/gallium/drivers/r600/sfn/sfn_valuefactory.h @@ -292,8 +292,8 @@ public: private: PVirtualValue ssa_src(const nir_ssa_def& dest, int chan); - PRegister local_register(const nir_reg_dest& dest, int chan); - PRegister local_register(const nir_reg_src& dest, int chan); + PRegister local_register(const nir_register_dest& dest, int chan); + PRegister local_register(const nir_register_src& dest, int chan); PRegister resolve_array(nir_register *reg, nir_src *indirect, int base_offset, int chan); diff --git a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c index 42d7d42a054..90cd232397f 100644 --- a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c +++ b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c @@ -1428,7 +1428,7 @@ get_var_from_reg(struct ntv_context *ctx, nir_register *reg, nir_alu_type *atype } static SpvId -get_src_reg(struct ntv_context *ctx, const nir_reg_src *reg, nir_alu_type *atype) +get_src_reg(struct ntv_context *ctx, const nir_register_src *reg, nir_alu_type *atype) { assert(reg->reg); assert(!reg->indirect); @@ -1573,7 +1573,7 @@ cast_src_to_type(struct ntv_context *ctx, SpvId value, nir_src src, nir_alu_type } static void -store_reg_def(struct ntv_context *ctx, nir_reg_dest *reg, SpvId result, nir_alu_type atype) +store_reg_def(struct ntv_context *ctx, nir_register_dest *reg, SpvId result, nir_alu_type atype) { atype = nir_alu_type_get_base_type(atype); init_reg(ctx, reg->reg, atype);
