Skip to content

aco: combine waitcnts that are close to each other

Tatsuyuki Ishi requested to merge ishitatsuyuki/mesa:waitcnt-combine into main

This change aims to reduce the waitcnt-to-code ratio in cases like below:

s_waitcnt vmcnt(7)
v_xor_b32_e32 v44, v44, v77
s_waitcnt vmcnt(6)
v_xor_b32_e32 v46, v46, v78
s_waitcnt vmcnt(5)
v_xor_b32_e32 v47, v47, v79
s_waitcnt vmcnt(4)
v_xor_b32_e32 v48, v48, v80
s_waitcnt vmcnt(3)
v_xor_b32_e32 v49, v49, v81
s_waitcnt vmcnt(2)
v_xor_b32_e32 v50, v50, v82
s_waitcnt vmcnt(1)
v_xor_b32_e32 v51, v51, v83
s_waitcnt vmcnt(0)
v_xor_b32_e32 v37, v37, v45

Doing so slightly increases the overall shader latency, but should provide an instruction count reduction in return. The overall performance change should be small given that memory access cost dominates anyway, but combining also makes the dumped ISA more readable.

Merge request reports