[all-commits] [llvm/llvm-project] fef697: AMDGPU: Handle waitcnt overflow

Austin Kerbow via All-commits all-commits at lists.llvm.org
Sat Nov 23 09:36:34 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: fef69706dc7828c3c662533054f136de6a7bdd98
      https://github.com/llvm/llvm-project/commit/fef69706dc7828c3c662533054f136de6a7bdd98
  Author: Austin Kerbow <Austin.Kerbow at amd.com>
  Date:   2019-11-23 (Sat, 23 Nov 2019)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
    A llvm/test/CodeGen/AMDGPU/waitcnt-overflow.mir

  Log Message:
  -----------
  AMDGPU: Handle waitcnt overflow

Summary:
The waitcnt pass can overflow the counters when the number of outstanding events
for a type exceed the capacity of the counter. This can lead to inefficient
insertion of waitcnts, or to waitcnt instructions with max values for each type.
The last situation can cause an instruction which when disassembled appears to
be an illegal waitcnt without an operand.

In these cases we should add a wait for the 'counter maximum' - 1, and update the
waitcnt brackets accordingly.

Reviewers: rampitec, arsenm

Reviewed By: rampitec

Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D70418




More information about the All-commits mailing list