mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 06:00:10 +01:00
pan/midgard: Add mir_rewrite_dst_tag helper
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
This commit is contained in:
parent
b3cab85606
commit
f9e619fa82
2 changed files with 15 additions and 0 deletions
|
|
@ -372,6 +372,7 @@ mir_is_alu_bundle(midgard_bundle *bundle)
|
|||
void mir_rewrite_index(compiler_context *ctx, unsigned old, unsigned new);
|
||||
void mir_rewrite_index_src(compiler_context *ctx, unsigned old, unsigned new);
|
||||
void mir_rewrite_index_dst(compiler_context *ctx, unsigned old, unsigned new);
|
||||
void mir_rewrite_index_dst_tag(compiler_context *ctx, unsigned old, unsigned new, unsigned tag);
|
||||
void mir_rewrite_index_src_single(midgard_instruction *ins, unsigned old, unsigned new);
|
||||
void mir_rewrite_index_src_tag(compiler_context *ctx, unsigned old, unsigned new, unsigned tag);
|
||||
bool mir_single_use(compiler_context *ctx, unsigned value);
|
||||
|
|
|
|||
|
|
@ -65,6 +65,20 @@ mir_rewrite_index_dst(compiler_context *ctx, unsigned old, unsigned new)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
mir_rewrite_index_dst_tag(compiler_context *ctx, unsigned old, unsigned new, unsigned tag)
|
||||
{
|
||||
mir_foreach_instr_global(ctx, ins) {
|
||||
if (ins->type != tag)
|
||||
continue;
|
||||
|
||||
if (ins->ssa_args.dest == old)
|
||||
ins->ssa_args.dest = new;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
mir_rewrite_index(compiler_context *ctx, unsigned old, unsigned new)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue