OSDN Git Service

AMDGPU/InsertWaitcnts: Simplify pending events tracking
authorNicolai Haehnle <nhaehnle@gmail.com>
Thu, 29 Nov 2018 11:06:14 +0000 (11:06 +0000)
committerNicolai Haehnle <nhaehnle@gmail.com>
Thu, 29 Nov 2018 11:06:14 +0000 (11:06 +0000)
commit219b87abb4d6e0e98c97f787cf9af5f038f546ef
tree1735a9e9c95fb54e73e200b3b2f4517cf16a3a63
parentcd71b9eae53b3798a7fbcc028c521261d6dd7b37
AMDGPU/InsertWaitcnts: Simplify pending events tracking

Summary:
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.

Reviewers: msearles, rampitec, scott.linder, kanarayan

Subscribers: arsenm, kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, llvm-commits, hakzsam

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347850 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AMDGPU/SIInsertWaitcnts.cpp