mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-03 16:28:08 +02:00
pan/midgard: Add mir_rewrite_index_src_tag
Specialized version of a rewrite that only rewrites a certain type of instruction. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
This commit is contained in:
parent
5d5caf10af
commit
eedd6c1dd0
2 changed files with 14 additions and 0 deletions
|
|
@ -373,6 +373,7 @@ 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_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);
|
||||
|
||||
/* MIR printing */
|
||||
|
|
|
|||
|
|
@ -43,6 +43,19 @@ mir_rewrite_index_src(compiler_context *ctx, unsigned old, unsigned new)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
mir_rewrite_index_src_tag(compiler_context *ctx, unsigned old, unsigned new, unsigned tag)
|
||||
{
|
||||
mir_foreach_instr_global(ctx, ins) {
|
||||
if (ins->type != tag)
|
||||
continue;
|
||||
|
||||
mir_rewrite_index_src_single(ins, old, new);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
mir_rewrite_index_dst(compiler_context *ctx, unsigned old, unsigned new)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue