[PATCH] D156679: [WIP][AMDGPU][SIInsertWaitcnts] Do not add s_waitcnt when the counters are known to be 0 already

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 31 08:17:30 PDT 2023

foad added a subscriber: stepthomas.
foad added a comment.

This needs a wider discussion. The current philosophy in SIInsertWaitcnts is that it will never remove a pre-existing waitcnt, since it could have been added by the user to work around a hardware bug in ways that the hardware does not understand. We could change that philosophy but it would need wider agreement.

The secondary problem is that SIInsertWaitcnts can't distinguish a waitcnt added by the user from one added by SIMemoryLegalizer. It would be great if SIInsertWaitcnts could remove the latter.

Adding @stepthomas for awareness.

  rG LLVM Github Monorepo



More information about the llvm-commits mailing list