mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 11:00:11 +01:00
pan/bi: Remove NIR registers from the IR
They are now unused, so normal == SSA at this point. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17794>
This commit is contained in:
parent
f6abcf534a
commit
1699d98e8e
4 changed files with 4 additions and 20 deletions
|
|
@ -91,8 +91,6 @@ bi_print_index(FILE *fp, bi_index index)
|
|||
fprintf(fp, "%s", bir_passthrough_name(index.value));
|
||||
else if (index.type == BI_INDEX_REGISTER)
|
||||
fprintf(fp, "r%u", index.value);
|
||||
else if (index.type == BI_INDEX_NORMAL && index.reg)
|
||||
fprintf(fp, "nr%u", index.value);
|
||||
else if (index.type == BI_INDEX_NORMAL)
|
||||
fprintf(fp, "%u", index.value);
|
||||
else
|
||||
|
|
|
|||
|
|
@ -624,7 +624,6 @@ bi_rewrite_index_src_single(bi_instr *ins, bi_index old, bi_index new)
|
|||
bi_foreach_src(ins, i) {
|
||||
if (bi_is_equiv(ins->src[i], old)) {
|
||||
ins->src[i].type = new.type;
|
||||
ins->src[i].reg = new.reg;
|
||||
ins->src[i].value = new.value;
|
||||
}
|
||||
}
|
||||
|
|
@ -952,13 +951,11 @@ squeeze_index(bi_context *ctx)
|
|||
bi_foreach_instr_global(ctx, I) {
|
||||
bi_foreach_dest(I, d) {
|
||||
I->dest[d].value = find_or_allocate_temp(map, bi_get_node(I->dest[d]), &ctx->ssa_alloc);
|
||||
I->dest[d].reg = false;
|
||||
}
|
||||
|
||||
bi_foreach_src(I, s) {
|
||||
if (I->src[s].type == BI_INDEX_NORMAL)
|
||||
I->src[s].value = find_or_allocate_temp(map, bi_get_node(I->src[s]), &ctx->ssa_alloc);
|
||||
I->src[s].reg = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1348,7 +1348,6 @@ bi_use_passthrough(bi_instr *ins, bi_index old,
|
|||
if (bi_is_word_equiv(ins->src[i], old)) {
|
||||
ins->src[i].type = BI_INDEX_PASS;
|
||||
ins->src[i].value = new;
|
||||
ins->src[i].reg = false;
|
||||
ins->src[i].offset = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -131,11 +131,10 @@ typedef struct {
|
|||
* the lower half, other values unused. */
|
||||
enum bi_swizzle swizzle : 4;
|
||||
uint32_t offset : 3;
|
||||
bool reg : 1;
|
||||
enum bi_index_type type : 3;
|
||||
|
||||
/* Must be zeroed so we can hash the whole 64-bits at a time */
|
||||
unsigned padding : (32 - 14);
|
||||
unsigned padding : (32 - 13);
|
||||
} bi_index;
|
||||
|
||||
static inline bi_index
|
||||
|
|
@ -145,7 +144,6 @@ bi_get_index(unsigned value, bool is_reg, unsigned offset)
|
|||
.value = value,
|
||||
.swizzle = BI_SWIZZLE_H01,
|
||||
.offset = offset,
|
||||
.reg = is_reg,
|
||||
.type = BI_INDEX_NORMAL,
|
||||
};
|
||||
}
|
||||
|
|
@ -317,7 +315,7 @@ bi_is_null(bi_index idx)
|
|||
static inline bool
|
||||
bi_is_ssa(bi_index idx)
|
||||
{
|
||||
return idx.type == BI_INDEX_NORMAL && !idx.reg;
|
||||
return idx.type == BI_INDEX_NORMAL;
|
||||
}
|
||||
|
||||
/* Compares equivalence as references. Does not compare offsets, swizzles, or
|
||||
|
|
@ -328,7 +326,6 @@ static inline bool
|
|||
bi_is_equiv(bi_index left, bi_index right)
|
||||
{
|
||||
return (left.type == right.type) &&
|
||||
(left.reg == right.reg) &&
|
||||
(left.value == right.value);
|
||||
}
|
||||
|
||||
|
|
@ -359,7 +356,6 @@ bi_is_value_equiv(bi_index left, bi_index right)
|
|||
(left.neg == right.neg) &&
|
||||
(left.swizzle == right.swizzle) &&
|
||||
(left.offset == right.offset) &&
|
||||
(left.reg == right.reg) &&
|
||||
(left.type == right.type);
|
||||
}
|
||||
}
|
||||
|
|
@ -930,12 +926,6 @@ bi_temp(bi_context *ctx)
|
|||
return bi_get_index(ctx->ssa_alloc++, false, 0);
|
||||
}
|
||||
|
||||
static inline bi_index
|
||||
bi_temp_reg(bi_context *ctx)
|
||||
{
|
||||
return bi_get_index(ctx->reg_alloc++, true, 0);
|
||||
}
|
||||
|
||||
/* Inline constants automatically, will be lowered out by bi_lower_fau where a
|
||||
* constant is not allowed. load_const_to_scalar gaurantees that this makes
|
||||
* sense */
|
||||
|
|
@ -964,7 +954,7 @@ bi_get_node(bi_index index)
|
|||
if (bi_is_null(index) || index.type != BI_INDEX_NORMAL)
|
||||
return ~0;
|
||||
else
|
||||
return (index.value << 1) | index.reg;
|
||||
return index.value;
|
||||
}
|
||||
|
||||
static inline bi_index
|
||||
|
|
@ -973,7 +963,7 @@ bi_node_to_index(unsigned node, unsigned node_count)
|
|||
assert(node < node_count);
|
||||
assert(node_count < ~0u);
|
||||
|
||||
return bi_get_index(node >> 1, node & PAN_IS_REG, 0);
|
||||
return bi_get_index(node, false, 0);
|
||||
}
|
||||
|
||||
/* Iterators for Bifrost IR */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue