[PATCH] D47488: [AMDGPU][Waitcnt] Fix handling of loops with many bottom blocks

Mark Searles via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 29 10:39:12 PDT 2018


msearles created this revision.
msearles added reviewers: rampitec, cfang.
msearles added a project: AMDGPU.
Herald added subscribers: t-tye, tpr, dstuttard, yaxunl, nhaehnle, wdng, kzhuravl, arsenm.

In terms of waitcnt insertion/if necessary, the waitcnt pass forces convergence for a loop. Previously, that kicked if greater than 2 passes over a loop, which doesn't account for loop with many bottom blocks. So, increase the threshold to (n+1), where n is the number of bottom blocks. This gives the pass an opportunity to consider the contribution of each bottom block, to the overall loop, before the forced convergence potentially kicks in.


https://reviews.llvm.org/D47488

Files:
  lib/Target/AMDGPU/SIInsertWaitcnts.cpp
  test/CodeGen/AMDGPU/waitcnt-back-edge-loop.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47488.148940.patch
Type: text/x-patch
Size: 5956 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180529/f70b3841/attachment.bin>


More information about the llvm-commits mailing list