aco: improve waitcnt insertion around loops
authorRhys Perry <pendingchaos02@gmail.com>
Mon, 21 Oct 2019 20:36:41 +0000 (21:36 +0100)
committerRhys Perry <pendingchaos02@gmail.com>
Thu, 21 Nov 2019 20:28:57 +0000 (20:28 +0000)
commitd1b9deeea89f70ea5a4f2cb6c82785d3179e5ad2
tree6feceee77372136ea391aa5c5f5e3687784e96c9
parent1a8c49d76c389cfe8ceefdd2048d70c889116d11
aco: improve waitcnt insertion around loops

Do this by repeating processing of loops until no progress is made.

Totals from affected shaders:
SGPRS: 162576 -> 162576 (0.00 %)
VGPRS: 145228 -> 145228 (0.00 %)
Spilled SGPRs: 668 -> 668 (0.00 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Private memory VGPRs: 0 -> 0 (0.00 %)
Scratch size: 0 -> 0 (0.00 %) dwords per thread
Code Size: 15778640 -> 15771336 (-0.05 %) bytes
LDS: 146 -> 146 (0.00 %) blocks
Max Waves: 6087 -> 6087 (0.00 %)

v2: use block_kind_loop_header/block_kind_loop_exit to repeat at the end
    of loops instead of at each continue

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
src/amd/compiler/aco_insert_waitcnt.cpp