mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 19:20:12 +01:00
nir: Remove reg-only dest manipulation
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24432>
This commit is contained in:
parent
ab0d878932
commit
c512636cf0
2 changed files with 0 additions and 42 deletions
|
|
@ -503,16 +503,6 @@ void nir_src_copy(nir_src *dest, const nir_src *src, nir_instr *instr)
|
|||
src_copy(dest, src, instr ? gc_get_context(instr) : NULL);
|
||||
}
|
||||
|
||||
void nir_dest_copy(nir_dest *dest, const nir_dest *src, nir_instr *instr)
|
||||
{
|
||||
/* Copying an SSA definition makes no sense whatsoever. */
|
||||
assert(!src->is_ssa);
|
||||
|
||||
dest->is_ssa = false;
|
||||
|
||||
dest->reg.reg = src->reg.reg;
|
||||
}
|
||||
|
||||
void
|
||||
nir_alu_src_copy(nir_alu_src *dest, const nir_alu_src *src,
|
||||
nir_alu_instr *instr)
|
||||
|
|
@ -524,14 +514,6 @@ nir_alu_src_copy(nir_alu_src *dest, const nir_alu_src *src,
|
|||
dest->swizzle[i] = src->swizzle[i];
|
||||
}
|
||||
|
||||
void
|
||||
nir_alu_dest_copy(nir_alu_dest *dest, const nir_alu_dest *src,
|
||||
nir_alu_instr *instr)
|
||||
{
|
||||
nir_dest_copy(&dest->dest, &src->dest, &instr->instr);
|
||||
dest->write_mask = src->write_mask;
|
||||
}
|
||||
|
||||
bool
|
||||
nir_alu_src_is_trivial_ssa(const nir_alu_instr *alu, unsigned srcn)
|
||||
{
|
||||
|
|
@ -1659,25 +1641,6 @@ nir_if_rewrite_condition(nir_if *if_stmt, nir_src new_src)
|
|||
src_add_all_uses(src, NULL, if_stmt);
|
||||
}
|
||||
|
||||
void
|
||||
nir_instr_rewrite_dest(nir_instr *instr, nir_dest *dest, nir_dest new_dest)
|
||||
{
|
||||
if (dest->is_ssa) {
|
||||
/* We can only overwrite an SSA destination if it has no uses. */
|
||||
assert(nir_ssa_def_is_unused(&dest->ssa));
|
||||
} else {
|
||||
list_del(&dest->reg.def_link);
|
||||
}
|
||||
|
||||
/* We can't re-write with an SSA def */
|
||||
assert(!new_dest.is_ssa);
|
||||
|
||||
nir_dest_copy(dest, &new_dest, instr);
|
||||
|
||||
dest->reg.parent_instr = instr;
|
||||
list_addtail(&dest->reg.def_link, &new_dest.reg.reg->defs);
|
||||
}
|
||||
|
||||
void
|
||||
nir_ssa_def_init(nir_instr *instr, nir_ssa_def *def,
|
||||
unsigned num_components,
|
||||
|
|
|
|||
|
|
@ -1176,7 +1176,6 @@ nir_is_sequential_comp_swizzle(uint8_t *swiz, unsigned nr_comp)
|
|||
}
|
||||
|
||||
void nir_src_copy(nir_src *dest, const nir_src *src, nir_instr *instr);
|
||||
void nir_dest_copy(nir_dest *dest, const nir_dest *src, nir_instr *instr);
|
||||
|
||||
typedef struct {
|
||||
/** Base source */
|
||||
|
|
@ -1557,8 +1556,6 @@ typedef struct nir_alu_instr {
|
|||
|
||||
void nir_alu_src_copy(nir_alu_src *dest, const nir_alu_src *src,
|
||||
nir_alu_instr *instr);
|
||||
void nir_alu_dest_copy(nir_alu_dest *dest, const nir_alu_dest *src,
|
||||
nir_alu_instr *instr);
|
||||
|
||||
bool nir_alu_instr_is_copy(nir_alu_instr *instr);
|
||||
|
||||
|
|
@ -4521,8 +4518,6 @@ void nir_instr_rewrite_src(nir_instr *instr, nir_src *src, nir_src new_src);
|
|||
void nir_instr_move_src(nir_instr *dest_instr, nir_src *dest, nir_src *src);
|
||||
|
||||
void nir_if_rewrite_condition(nir_if *if_stmt, nir_src new_src);
|
||||
void nir_instr_rewrite_dest(nir_instr *instr, nir_dest *dest,
|
||||
nir_dest new_dest);
|
||||
|
||||
void nir_ssa_dest_init(nir_instr *instr, nir_dest *dest,
|
||||
unsigned num_components, unsigned bit_size);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue