mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-21 22:20:14 +01:00
aco/optimizer_postRA: Initialize loop header with preheader information
This works because of SSA and should be safer than just setting 'not_written_yet'. No Fossil DB changes on Rembrandt (RDNA2). Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16161>
This commit is contained in:
parent
8f4eccb138
commit
d3b0f78110
1 changed files with 9 additions and 1 deletions
|
|
@ -107,9 +107,17 @@ struct pr_opt_ctx {
|
|||
current_block = block;
|
||||
current_instr_idx = 0;
|
||||
|
||||
if ((block->kind & block_kind_loop_header) || block->linear_preds.empty()) {
|
||||
if (block->linear_preds.empty()) {
|
||||
std::fill(instr_idx_by_regs[block->index].begin(), instr_idx_by_regs[block->index].end(),
|
||||
not_written_yet);
|
||||
} else if (block->kind & block_kind_loop_header) {
|
||||
/* Initialize with content from loop preheader */
|
||||
memcpy(&instr_idx_by_regs[block->index][0], &instr_idx_by_regs[block->index - 1][0],
|
||||
max_reg_cnt * sizeof(Idx));
|
||||
|
||||
/* Assume exec writes on back-edges */
|
||||
instr_idx_by_regs[block->index][126] = overwritten_untrackable;
|
||||
instr_idx_by_regs[block->index][127] = overwritten_untrackable;
|
||||
} else {
|
||||
reset_block_regs(block->linear_preds, block->index, 0, max_sgpr_cnt);
|
||||
reset_block_regs(block->linear_preds, block->index, 251, 3);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue