aco: use more predictable tiebreaker when forming MADs
fossil-db (GFX10.3): Totals from 84981 (58.10% of 146267) affected shaders: VGPRs: 3829896 -> 3820480 (-0.25%); split: -0.33%, +0.08% CodeSize: 270860472 -> 270850132 (-0.00%); split: -0.08%, +0.08% MaxWaves: 2035822 -> 2042516 (+0.33%); split: +0.39%, -0.06% Instrs: 51285526 -> 51308869 (+0.05%); split: -0.03%, +0.08% Latency: 931503706 -> 932556231 (+0.11%); split: -0.19%, +0.30% InvThroughput: 217084232 -> 217070849 (-0.01%); split: -0.12%, +0.11% fossil-db (GFX10): Totals from 85520 (58.47% of 146267) affected shaders: VGPRs: 3729132 -> 3725344 (-0.10%); split: -0.21%, +0.10% CodeSize: 272796500 -> 272783084 (-0.00%); split: -0.09%, +0.08% MaxWaves: 2246410 -> 2249012 (+0.12%); split: +0.17%, -0.05% Instrs: 51643962 -> 51664865 (+0.04%); split: -0.04%, +0.08% Latency: 932331949 -> 933274979 (+0.10%); split: -0.19%, +0.29% InvThroughput: 214187040 -> 214130994 (-0.03%); split: -0.13%, +0.11% fossil-db (GFX9): Totals from 84619 (57.80% of 146401) affected shaders: SGPRs: 5366240 -> 5366944 (+0.01%); split: -0.09%, +0.10% VGPRs: 3765608 -> 3764972 (-0.02%); split: -0.23%, +0.22% CodeSize: 263634732 -> 263616320 (-0.01%); split: -0.08%, +0.08% MaxWaves: 546617 -> 547091 (+0.09%); split: +0.18%, -0.09% Instrs: 51426195 -> 51458334 (+0.06%); split: -0.03%, +0.10% Latency: 1164445660 -> 1161923480 (-0.22%); split: -0.46%, +0.24% InvThroughput: 542964697 -> 542329595 (-0.12%); split: -0.26%, +0.14% Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9805>
This commit is contained in:
parent
9a388beda7
commit
a487747ebd
|
@ -3372,9 +3372,16 @@ combine_instruction(opt_ctx& ctx, aco_ptr<Instruction>& instr)
|
|||
|
||||
Operand op[3] = {info.instr->operands[0], info.instr->operands[1], instr->operands[1 - i]};
|
||||
if (info.instr->isSDWA() || info.instr->isDPP() || !check_vop3_operands(ctx, 3, op) ||
|
||||
ctx.uses[instr->operands[i].tempId()] >= uses)
|
||||
ctx.uses[instr->operands[i].tempId()] > uses)
|
||||
continue;
|
||||
|
||||
if (ctx.uses[instr->operands[i].tempId()] == uses) {
|
||||
unsigned cur_idx = mul_instr->definitions[0].tempId();
|
||||
unsigned new_idx = info.instr->definitions[0].tempId();
|
||||
if (cur_idx > new_idx)
|
||||
continue;
|
||||
}
|
||||
|
||||
mul_instr = info.instr;
|
||||
add_op_idx = 1 - i;
|
||||
uses = ctx.uses[instr->operands[i].tempId()];
|
||||
|
|
Loading…
Reference in New Issue