mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 21:50:12 +01:00
aco: always set exec_live=false
Register demand calculation for exec masks doesn't always match get_live_changes() and get_temp_registers(). For now, just set exec_live=false. fossil-db (GFX10.3): Totals from 108230 (77.64% of 139391) affected shaders: SGPRs: 5759658 -> 5756818 (-0.05%); split: -0.08%, +0.03% VGPRs: 4061104 -> 4061248 (+0.00%); split: -0.00%, +0.01% SpillSGPRs: 14114 -> 15198 (+7.68%); split: -0.10%, +7.78% CodeSize: 266548396 -> 266603288 (+0.02%); split: -0.01%, +0.03% MaxWaves: 1390885 -> 1390855 (-0.00%); split: +0.00%, -0.00% Instrs: 50983353 -> 50992972 (+0.02%); split: -0.02%, +0.04% Cycles: 1733042048 -> 1735443264 (+0.14%); split: -0.02%, +0.16% VMEM: 41933625 -> 41914722 (-0.05%); split: +0.04%, -0.09% SMEM: 7197675 -> 7197789 (+0.00%); split: +0.16%, -0.16% VClause: 1050885 -> 1050978 (+0.01%); split: -0.02%, +0.03% SClause: 2074913 -> 2071844 (-0.15%); split: -0.23%, +0.08% Copies: 3181464 -> 3188125 (+0.21%); split: -0.38%, +0.59% Branches: 1127526 -> 1127716 (+0.02%); split: -0.10%, +0.12% PreSGPRs: 3376687 -> 3586076 (+6.20%); split: -0.00%, +6.20% PreVGPRs: 3339740 -> 3339811 (+0.00%) Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8807>
This commit is contained in:
parent
3824c06aff
commit
d1f93261b1
1 changed files with 1 additions and 20 deletions
|
|
@ -91,13 +91,6 @@ void process_live_temps_per_block(Program *program, live& lives, Block* block,
|
|||
block->register_demand = RegisterDemand();
|
||||
IDSet live = lives.live_out[block->index];
|
||||
|
||||
/* add the live_out_exec to live */
|
||||
bool exec_live = false;
|
||||
if (block->live_out_exec != Temp()) {
|
||||
live.insert(block->live_out_exec.id());
|
||||
exec_live = true;
|
||||
}
|
||||
|
||||
/* initialize register demand */
|
||||
for (unsigned t : live)
|
||||
new_demand += Temp(t, program->temp_rc[t]);
|
||||
|
|
@ -110,10 +103,7 @@ void process_live_temps_per_block(Program *program, live& lives, Block* block,
|
|||
if (is_phi(insn))
|
||||
break;
|
||||
|
||||
/* substract the 1 or 2 sgprs from exec */
|
||||
if (exec_live)
|
||||
assert(new_demand.sgpr >= (int16_t) program->lane_mask.size());
|
||||
register_demand[idx] = RegisterDemand(new_demand.vgpr, new_demand.sgpr - (exec_live ? program->lane_mask.size() : 0));
|
||||
register_demand[idx] = RegisterDemand(new_demand.vgpr, new_demand.sgpr);
|
||||
|
||||
/* KILL */
|
||||
for (Definition& definition : insn->definitions) {
|
||||
|
|
@ -133,9 +123,6 @@ void process_live_temps_per_block(Program *program, live& lives, Block* block,
|
|||
register_demand[idx] += temp;
|
||||
definition.setKill(true);
|
||||
}
|
||||
|
||||
if (definition.isFixed() && definition.physReg() == exec)
|
||||
exec_live = false;
|
||||
}
|
||||
|
||||
/* GEN */
|
||||
|
|
@ -169,9 +156,6 @@ void process_live_temps_per_block(Program *program, live& lives, Block* block,
|
|||
register_demand[idx] += temp;
|
||||
new_demand += temp;
|
||||
}
|
||||
|
||||
if (operand.isFixed() && operand.physReg() == exec)
|
||||
exec_live = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -179,9 +163,6 @@ void process_live_temps_per_block(Program *program, live& lives, Block* block,
|
|||
}
|
||||
|
||||
/* update block's register demand for a last time */
|
||||
if (exec_live)
|
||||
assert(new_demand.sgpr >= (int16_t) program->lane_mask.size());
|
||||
new_demand.sgpr -= exec_live ? program->lane_mask.size() : 0;
|
||||
block->register_demand.update(new_demand);
|
||||
|
||||
/* handle phi definitions */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue