aco/spill: allow for disconnected CFG
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20853>
This commit is contained in:
committed by
Marge Bot
parent
caec48529b
commit
3d4f6a00b8
@@ -486,7 +486,7 @@ init_live_in_vars(spill_ctx& ctx, Block* block, unsigned block_idx)
|
||||
RegisterDemand spilled_registers;
|
||||
|
||||
/* first block, nothing was spilled before */
|
||||
if (block_idx == 0)
|
||||
if (block->linear_preds.empty())
|
||||
return {0, 0};
|
||||
|
||||
/* next use distances at the beginning of the current block */
|
||||
@@ -1679,7 +1679,7 @@ end_unused_spill_vgprs(spill_ctx& ctx, Block& block, std::vector<Temp>& vgpr_spi
|
||||
vgpr_spill_temps[i] = Temp();
|
||||
}
|
||||
}
|
||||
if (temps.empty())
|
||||
if (temps.empty() || block.linear_preds.empty())
|
||||
return;
|
||||
|
||||
aco_ptr<Instruction> destr{create_instruction<Pseudo_instruction>(
|
||||
@@ -1743,7 +1743,7 @@ assign_spill_slots(spill_ctx& ctx, unsigned spills_to_vgpr)
|
||||
unsigned last_top_level_block_idx = 0;
|
||||
for (Block& block : ctx.program->blocks) {
|
||||
|
||||
if (block.kind & block_kind_top_level && !block.linear_preds.empty()) {
|
||||
if (block.kind & block_kind_top_level) {
|
||||
last_top_level_block_idx = block.index;
|
||||
|
||||
end_unused_spill_vgprs(ctx, block, vgpr_spill_temps, slots, ctx.spills_entry[block.index]);
|
||||
|
||||
Reference in New Issue
Block a user