aco: stop scheduling if clause-forming fails
This avoids unintended reordering of VMEM instructions. It is also highly unlikely that we find more independent instructions before previous clause-related instructions. Totals from 1921 (1.28% of 150170) affected shaders: (GFX10.3) VGPRs: 103832 -> 103736 (-0.09%); split: -0.10%, +0.01% CodeSize: 8695560 -> 8706000 (+0.12%); split: -0.03%, +0.15% Instrs: 1643752 -> 1646349 (+0.16%); split: -0.04%, +0.20% Latency: 26755527 -> 26614645 (-0.53%); split: -0.67%, +0.14% InvThroughput: 7226604 -> 7204809 (-0.30%); split: -0.39%, +0.08% VClause: 46536 -> 46201 (-0.72%); split: -0.81%, +0.09% SClause: 47910 -> 47769 (-0.29%); split: -0.43%, +0.14% Copies: 94647 -> 94558 (-0.09%); split: -0.26%, +0.17% Branches: 36843 -> 36847 (+0.01%); split: -0.00%, +0.01% Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10896>
This commit is contained in:
parent
ecc6d78b05
commit
903999c119
|
@ -838,6 +838,8 @@ schedule_VMEM(sched_ctx& ctx, Block* block, std::vector<RegisterDemand>& registe
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (!can_move_down) {
|
if (!can_move_down) {
|
||||||
|
if (part_of_clause)
|
||||||
|
break;
|
||||||
add_to_hazard_query(&indep_hq, candidate.get());
|
add_to_hazard_query(&indep_hq, candidate.get());
|
||||||
add_to_hazard_query(&clause_hq, candidate.get());
|
add_to_hazard_query(&clause_hq, candidate.get());
|
||||||
ctx.mv.downwards_skip(cursor);
|
ctx.mv.downwards_skip(cursor);
|
||||||
|
@ -847,6 +849,8 @@ schedule_VMEM(sched_ctx& ctx, Block* block, std::vector<RegisterDemand>& registe
|
||||||
Instruction* candidate_ptr = candidate.get();
|
Instruction* candidate_ptr = candidate.get();
|
||||||
MoveResult res = ctx.mv.downwards_move(cursor, part_of_clause);
|
MoveResult res = ctx.mv.downwards_move(cursor, part_of_clause);
|
||||||
if (res == move_fail_ssa || res == move_fail_rar) {
|
if (res == move_fail_ssa || res == move_fail_rar) {
|
||||||
|
if (part_of_clause)
|
||||||
|
break;
|
||||||
add_to_hazard_query(&indep_hq, candidate.get());
|
add_to_hazard_query(&indep_hq, candidate.get());
|
||||||
add_to_hazard_query(&clause_hq, candidate.get());
|
add_to_hazard_query(&clause_hq, candidate.get());
|
||||||
ctx.mv.downwards_skip(cursor);
|
ctx.mv.downwards_skip(cursor);
|
||||||
|
|
Loading…
Reference in New Issue