aco: apply literals to split mads
Removing the return is also needed to apply literals to mads (which can be done on GFX10). pipeline-db (Navi): Totals from affected shaders: SGPRS: 368787 -> 367555 (-0.33 %) VGPRS: 312436 -> 312448 (0.00 %) Spilled SGPRs: 461 -> 461 (0.00 %) Spilled VGPRs: 0 -> 0 (0.00 %) Code Size: 26113388 -> 26098260 (-0.06 %) bytes Max Waves: 35982 -> 35982 (0.00 %) Instructions: 5038670 -> 5028941 (-0.19 %) pipeline-db (Vega): Totals from affected shaders: SGPRS: 369843 -> 368659 (-0.32 %) VGPRS: 317224 -> 317196 (-0.01 %) Spilled SGPRs: 629 -> 629 (0.00 %) Spilled VGPRs: 0 -> 0 (0.00 %) Code Size: 26310540 -> 26295156 (-0.06 %) bytes Max Waves: 36324 -> 36326 (0.01 %) Instructions: 5073957 -> 5064164 (-0.19 %) 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/2883>
This commit is contained in:
@@ -2301,6 +2301,10 @@ void select_instruction(opt_ctx &ctx, aco_ptr<Instruction>& instr)
|
||||
/* first, check profitability */
|
||||
if (ctx.uses[info->mul_temp_id]) {
|
||||
ctx.uses[info->mul_temp_id]++;
|
||||
if (instr->operands[0].isTemp())
|
||||
ctx.uses[instr->operands[0].tempId()]--;
|
||||
if (instr->operands[1].isTemp())
|
||||
ctx.uses[instr->operands[1].tempId()]--;
|
||||
instr.swap(info->add_instr);
|
||||
|
||||
/* second, check possible literals */
|
||||
@@ -2333,7 +2337,6 @@ void select_instruction(opt_ctx &ctx, aco_ptr<Instruction>& instr)
|
||||
info->literal_idx = literal_idx;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/* check for literals */
|
||||
|
Reference in New Issue
Block a user