mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 04:00:10 +01:00
aco: don't create dead exec mask phis on merge blocks
Avoids some unnecessary exec copies and allows for a bit more jump threading. Totals from 112 (0.08% of 139391) affected shaders (NAVI10): SpillSGPRs: 3084 -> 3050 (-1.10%) CodeSize: 2657516 -> 2652376 (-0.19%) Instrs: 492074 -> 490824 (-0.25%) Cycles: 40369704 -> 40317052 (-0.13%) VMEM: 24212 -> 24128 (-0.35%) SClause: 12018 -> 12010 (-0.07%) Copies: 72950 -> 72275 (-0.93%) Branches: 13249 -> 12701 (-4.14%) Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8059>
This commit is contained in:
parent
a5f4be4fcd
commit
c4217ef2fc
1 changed files with 4 additions and 4 deletions
|
|
@ -590,7 +590,10 @@ unsigned add_coupling_code(exec_ctx& ctx, Block* block,
|
|||
/* if one of the predecessors ends in exact mask, we pop it from stack */
|
||||
unsigned num_exec_masks = std::min(ctx.info[preds[0]].exec.size(),
|
||||
ctx.info[preds[1]].exec.size());
|
||||
if (block->kind & block_kind_top_level && !(block->kind & block_kind_merge))
|
||||
|
||||
if (block->kind & block_kind_merge)
|
||||
num_exec_masks--;
|
||||
else if (block->kind & block_kind_top_level)
|
||||
num_exec_masks = std::min(num_exec_masks, 2u);
|
||||
|
||||
/* create phis for diverged exec masks */
|
||||
|
|
@ -617,9 +620,6 @@ unsigned add_coupling_code(exec_ctx& ctx, Block* block,
|
|||
i++;
|
||||
}
|
||||
|
||||
if (block->kind & block_kind_merge)
|
||||
ctx.info[idx].exec.pop_back();
|
||||
|
||||
if (block->kind & block_kind_top_level && ctx.info[idx].exec.size() == 3) {
|
||||
assert(ctx.info[idx].exec.back().second == mask_type_exact);
|
||||
assert(block->kind & block_kind_merge);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue