mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 13:10:10 +01:00
aco: copy-propgate through p_create_vector during value numbering
fossil-db (Navi): Totals from 182 (0.13% of 137413) affected shaders: SGPRs: 9304 -> 9312 (+0.09%) VGPRs: 7636 -> 7620 (-0.21%); split: -0.26%, +0.05% CodeSize: 733516 -> 733092 (-0.06%); split: -0.07%, +0.01% MaxWaves: 2478 -> 2479 (+0.04%) Instrs: 139664 -> 139561 (-0.07%); split: -0.09%, +0.02% Cycles: 3215104 -> 3214080 (-0.03%); split: -0.04%, +0.01% fossil-db (Polaris): Totals from 161 (0.12% of 138881) affected shaders: VGPRs: 5608 -> 5596 (-0.21%); split: -0.29%, +0.07% CodeSize: 605336 -> 605120 (-0.04%); split: -0.05%, +0.02% Instrs: 117957 -> 117902 (-0.05%); split: -0.07%, +0.02% Cycles: 3105008 -> 3103876 (-0.04%); split: -0.04%, +0.00% Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Acked-by: Timur Kristóf <timur.kristof@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7216>
This commit is contained in:
parent
0f31fa1b64
commit
e092f34dfa
1 changed files with 7 additions and 2 deletions
|
|
@ -389,8 +389,13 @@ void process_block(vn_ctx& ctx, Block& block)
|
|||
}
|
||||
|
||||
/* simple copy-propagation through renaming */
|
||||
if ((instr->opcode == aco_opcode::s_mov_b32 || instr->opcode == aco_opcode::s_mov_b64 || instr->opcode == aco_opcode::v_mov_b32) &&
|
||||
!instr->definitions[0].isFixed() && instr->operands[0].isTemp() && instr->operands[0].regClass() == instr->definitions[0].regClass() &&
|
||||
bool copy_instr =
|
||||
instr->opcode == aco_opcode::s_mov_b32 ||
|
||||
instr->opcode == aco_opcode::s_mov_b64 ||
|
||||
instr->opcode == aco_opcode::v_mov_b32 ||
|
||||
(instr->opcode == aco_opcode::p_create_vector && instr->operands.size() == 1);
|
||||
if (copy_instr && !instr->definitions[0].isFixed() && instr->operands[0].isTemp() &&
|
||||
instr->operands[0].regClass() == instr->definitions[0].regClass() &&
|
||||
!instr->isDPP() && !((int)instr->format & (int)Format::SDWA)) {
|
||||
ctx.renames[instr->definitions[0].tempId()] = instr->operands[0].getTemp();
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue