mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
aco/optimizer: remove p_linear_phi handling from optimizer
We remove trivial phis during value numbering, now. And the undef optimization seems to have no positive effect. Totals from 22 (0.03% of 79206) affected shaders: (GFX10.3) Instrs: 168529 -> 168260 (-0.16%) CodeSize: 912692 -> 911704 (-0.11%) Latency: 2607549 -> 2607335 (-0.01%) InvThroughput: 1124171 -> 1124109 (-0.01%) SClause: 5694 -> 5698 (+0.07%) Copies: 23503 -> 23364 (-0.59%) Branches: 8185 -> 8058 (-1.55%) PreSGPRs: 1536 -> 1531 (-0.33%) Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28661>
This commit is contained in:
parent
2d0c6647f0
commit
6b3e14ba83
1 changed files with 0 additions and 24 deletions
|
|
@ -1962,30 +1962,6 @@ label_instruction(opt_ctx& ctx, aco_ptr<Instruction>& instr)
|
|||
ctx.info[instr->definitions[0].tempId()].set_temp(
|
||||
ctx.info[instr->operands[1].tempId()].temp);
|
||||
break;
|
||||
case aco_opcode::p_linear_phi: {
|
||||
/* lower_bool_phis() can create phis like this */
|
||||
bool all_same_temp = instr->operands[0].isTemp();
|
||||
/* this check is needed when moving uniform loop counters out of a divergent loop */
|
||||
if (all_same_temp)
|
||||
all_same_temp = instr->definitions[0].regClass() == instr->operands[0].regClass();
|
||||
for (unsigned i = 1; all_same_temp && (i < instr->operands.size()); i++) {
|
||||
if (!instr->operands[i].isTemp() ||
|
||||
instr->operands[i].tempId() != instr->operands[0].tempId())
|
||||
all_same_temp = false;
|
||||
}
|
||||
if (all_same_temp) {
|
||||
ctx.info[instr->definitions[0].tempId()].set_temp(instr->operands[0].getTemp());
|
||||
} else {
|
||||
bool all_undef = instr->operands[0].isUndefined();
|
||||
for (unsigned i = 1; all_undef && (i < instr->operands.size()); i++) {
|
||||
if (!instr->operands[i].isUndefined())
|
||||
all_undef = false;
|
||||
}
|
||||
if (all_undef)
|
||||
ctx.info[instr->definitions[0].tempId()].set_undefined();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case aco_opcode::v_add_u32:
|
||||
case aco_opcode::v_add_co_u32:
|
||||
case aco_opcode::v_add_co_u32_e64:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue