aco: don't stop scheduling at exports

This allows us to move v_cvt_pkrtz_f16_f32 instructions upwards, improving
schedules and (somewhat unintentionally) moving the exports slightly
closer together.

Totals from affected shaders:
SGPRS: 1030224 -> 1030248 (0.00 %)
VGPRS: 794080 -> 794392 (0.04 %)
Spilled SGPRs: 127117 -> 127117 (0.00 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Scratch size: 0 -> 0 (0.00 %) dwords per thread
Code Size: 89028152 -> 89032312 (0.00 %) bytes
LDS: 0 -> 0 (0.00 %) blocks
Max Waves: 65252 -> 65219 (-0.05 %)
SMEM score: 843808.00 -> 843918.00 (0.01 %)
VMEM score: 5331687.00 -> 5397802.00 (1.24 %)
SMEM clauses: 567659 -> 567655 (-0.00 %)
VMEM clauses: 290715 -> 290716 (0.00 %)
Instructions: 17143219 -> 17144259 (0.01 %)
Cycles: 1098442808 -> 1098446968 (0.00 %)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3776>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3776>
This commit is contained in:
Rhys Perry 2020-02-11 16:55:39 +00:00 committed by Marge Bot
parent 6b4c31f814
commit 625d8705f0
1 changed files with 7 additions and 5 deletions

View File

@ -571,7 +571,7 @@ void schedule_SMEM(sched_ctx& ctx, Block* block,
bool can_move_down = true;
HazardResult haz = perform_hazard_query(&hq, candidate.get());
if (haz == hazard_fail_reorder_ds || haz == hazard_fail_spill || haz == hazard_fail_reorder_sendmsg || haz == hazard_fail_barrier)
if (haz == hazard_fail_reorder_ds || haz == hazard_fail_spill || haz == hazard_fail_reorder_sendmsg || haz == hazard_fail_barrier || haz == hazard_fail_export)
can_move_down = false;
else if (haz != hazard_success)
break;
@ -620,7 +620,8 @@ void schedule_SMEM(sched_ctx& ctx, Block* block,
if (found_dependency) {
HazardResult haz = perform_hazard_query(&hq, candidate.get());
if (haz == hazard_fail_reorder_ds || haz == hazard_fail_spill ||
haz == hazard_fail_reorder_sendmsg || haz == hazard_fail_barrier)
haz == hazard_fail_reorder_sendmsg || haz == hazard_fail_barrier ||
haz == hazard_fail_export)
is_dependency = true;
else if (haz != hazard_success)
break;
@ -711,7 +712,8 @@ void schedule_VMEM(sched_ctx& ctx, Block* block,
HazardResult haz = perform_hazard_query(part_of_clause ? &clause_hq : &indep_hq, candidate.get());
if (haz == hazard_fail_reorder_ds || haz == hazard_fail_spill ||
haz == hazard_fail_reorder_sendmsg || haz == hazard_fail_barrier)
haz == hazard_fail_reorder_sendmsg || haz == hazard_fail_barrier ||
haz == hazard_fail_export)
can_move_down = false;
else if (haz != hazard_success)
break;
@ -757,7 +759,7 @@ void schedule_VMEM(sched_ctx& ctx, Block* block,
HazardResult haz = perform_hazard_query(&indep_hq, candidate.get());
if (haz == hazard_fail_reorder_ds || haz == hazard_fail_spill ||
haz == hazard_fail_reorder_vmem_smem || haz == hazard_fail_reorder_sendmsg ||
haz == hazard_fail_barrier)
haz == hazard_fail_barrier || haz == hazard_fail_export)
is_dependency = true;
else if (haz != hazard_success)
break;
@ -822,7 +824,7 @@ void schedule_position_export(sched_ctx& ctx, Block* block,
break;
HazardResult haz = perform_hazard_query(&hq, candidate.get());
if (haz == hazard_fail_exec || haz == hazard_fail_export || haz == hazard_fail_memtime)
if (haz == hazard_fail_exec || haz == hazard_fail_memtime)
break;
if (haz != hazard_success) {