mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-21 11:50:33 +01:00
aco/optimizer: add second copy prop for pseudo instructions
Foz-DB Navi48: Totals from 28 (0.03% of 82405) affected shaders: Instrs: 144993 -> 144645 (-0.24%); split: -0.26%, +0.02% CodeSize: 784668 -> 783604 (-0.14%); split: -0.19%, +0.05% SpillVGPRs: 215 -> 209 (-2.79%) Latency: 2529900 -> 2526895 (-0.12%); split: -0.12%, +0.00% InvThroughput: 775379 -> 773859 (-0.20%); split: -0.20%, +0.00% VClause: 2815 -> 2803 (-0.43%) Copies: 23474 -> 23170 (-1.30%); split: -1.38%, +0.09% Branches: 4638 -> 4632 (-0.13%) VALU: 81924 -> 81620 (-0.37%); split: -0.40%, +0.03% SALU: 23986 -> 23995 (+0.04%); split: -0.03%, +0.07% VMEM: 3726 -> 3714 (-0.32%) Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39532>
This commit is contained in:
parent
269007faf3
commit
5ecc800edd
1 changed files with 17 additions and 0 deletions
|
|
@ -4217,6 +4217,23 @@ combine_instruction(opt_ctx& ctx, aco_ptr<Instruction>& instr)
|
|||
/* Apply SDWA. Do this after label_instruction() so it can remove
|
||||
* label_extract if not all instructions can take SDWA. */
|
||||
alu_propagate_temp_const(ctx, instr, true);
|
||||
} else if (instr->isPseudo()) {
|
||||
/* PSEUDO: propagate temporaries/constants */
|
||||
for (unsigned i = 0; i < instr->operands.size(); i++) {
|
||||
Operand op = instr->operands[i];
|
||||
if (!op.isTemp())
|
||||
continue;
|
||||
|
||||
ssa_info info = ctx.info[op.tempId()];
|
||||
while (info.is_temp()) {
|
||||
if (pseudo_propagate_temp(ctx, instr, info.temp, i)) {
|
||||
ctx.uses[info.temp.id()]++;
|
||||
decrease_and_dce(ctx, op.getTemp());
|
||||
op = instr->operands[i];
|
||||
}
|
||||
info = ctx.info[info.temp.id()];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (instr->isDPP())
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue