aco: initialize scratch base registers on GFX9-GFX10.3
fossil-db (navi21): Totals from 1142 (0.70% of 162293) affected shaders: Instrs: 271636 -> 271974 (+0.12%) CodeSize: 1532020 -> 1533792 (+0.12%) Latency: 7484066 -> 7485698 (+0.02%) InvThroughput: 4048824 -> 4049579 (+0.02%) SClause: 4171 -> 4212 (+0.98%) PreSGPRs: 11203 -> 12276 (+9.58%) fossil-db (vega10): Totals from 3327 (2.06% of 161355) affected shaders: Instrs: 257413 -> 257601 (+0.07%) CodeSize: 1424244 -> 1425372 (+0.08%) Latency: 8598402 -> 8600466 (+0.02%) InvThroughput: 7906335 -> 7908234 (+0.02%) SClause: 4932 -> 4973 (+0.83%) PreSGPRs: 22010 -> 25405 (+15.42%) 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/17079>
This commit is contained in:
@@ -83,7 +83,8 @@ process_block(dce_ctx& ctx, Block& block)
|
||||
bool
|
||||
is_dead(const std::vector<uint16_t>& uses, Instruction* instr)
|
||||
{
|
||||
if (instr->definitions.empty() || instr->isBranch())
|
||||
if (instr->definitions.empty() || instr->isBranch() ||
|
||||
instr->opcode == aco_opcode::p_init_scratch)
|
||||
return false;
|
||||
if (std::any_of(instr->definitions.begin(), instr->definitions.end(),
|
||||
[&uses](const Definition& def) { return !def.isTemp() || uses[def.tempId()]; }))
|
||||
|
||||
Reference in New Issue
Block a user