[PATCH] D54228: AMDGPU/InsertWaitcnts: Simplify pending events tracking

Nicolai Hähnle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 7 14:16:14 PST 2018


nhaehnle created this revision.
nhaehnle added reviewers: msearles, rampitec, scott.linder, kanarayan.
Herald added subscribers: t-tye, tpr, dstuttard, yaxunl, wdng, jvesely, kzhuravl, arsenm.

Instead of storing the "score" (last time point) of the various relevant
events, only store whether an event is pending or not.

This is sufficient, because whenever only one event of a count type is
pending, its last time point is naturally the upper bound of all time
points of this count type, and when multiple event types are pending,
the count type has gone out of order and an s_waitcnt to 0 is required
to clear any pending event type (and will then clear all pending event
types for that count type).

This also removes the special handling of GDS_GPR_LOCK and EXP_GPR_LOCK.
I do not understand what this special handling ever attempted to achieve.
It has existed ever since the original port from an internal code base,
so my best guess is that it solved a problem related to EXEC handling in
that internal code base.


Repository:
  rL LLVM

https://reviews.llvm.org/D54228

Files:
  lib/Target/AMDGPU/SIInsertWaitcnts.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54228.173029.patch
Type: text/x-patch
Size: 13649 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181107/87e20388/attachment.bin>


More information about the llvm-commits mailing list