mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-16 00:40:32 +01:00
aco/spill: skip p_branch in process_block
Fixes compilation of a Dead by Daylight shader.
fossil-db (gfx1100):
Totals from 58 (0.04% of 133461) affected shaders:
Instrs: 319824 -> 319421 (-0.13%); split: -0.13%, +0.00%
CodeSize: 1711260 -> 1708744 (-0.15%); split: -0.15%, +0.00%
SpillSGPRs: 2567 -> 2459 (-4.21%)
Latency: 3274930 -> 3274921 (-0.00%); split: -0.00%, +0.00%
InvThroughput: 924106 -> 924105 (-0.00%); split: -0.00%, +0.00%
Copies: 41883 -> 41757 (-0.30%); split: -0.31%, +0.00%
Branches: 9144 -> 9146 (+0.02%)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9599
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24896>
(cherry picked from commit cb096b85ff)
This commit is contained in:
parent
296653f328
commit
29fd84a5ae
2 changed files with 10 additions and 1 deletions
|
|
@ -10054,7 +10054,7 @@
|
|||
"description": "aco/spill: skip p_branch in process_block",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -1186,6 +1186,15 @@ process_block(spill_ctx& ctx, unsigned block_idx, Block* block, RegisterDemand s
|
|||
while (idx < block->instructions.size()) {
|
||||
aco_ptr<Instruction>& instr = block->instructions[idx];
|
||||
|
||||
/* Spilling is handled as part of phis (they should always have the same or higher register
|
||||
* demand). If we try to spill here, we might not be able to reduce the register demand enough
|
||||
* because there is no path to spill constant/undef phi operands. */
|
||||
if (instr->opcode == aco_opcode::p_branch) {
|
||||
instructions.emplace_back(std::move(instr));
|
||||
idx++;
|
||||
continue;
|
||||
}
|
||||
|
||||
std::map<Temp, std::pair<Temp, uint32_t>> reloads;
|
||||
|
||||
/* rename and reload operands */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue