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 <alyssa@rosenzweig.io> Acked-by: Caio Oliveira <caio.oliveira@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23956>
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
|
@@ -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));
|
||||
|
@@ -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);
|
||||
|
@@ -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])
|
||||
{
|
||||
|
@@ -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,
|
||||
|
@@ -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,
|
||||
|
@@ -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,
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user