Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Commit ae621a2

Browse files
R600/SI: fix inserting waits for all defines
Unfortunately the previous fix for inserting waits for unordered defines wasn't sufficient, cause it's possible that even ordered defines are only partially used (or not used at all). Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Tom Stellard <thomas.stellard@amd.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177271 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 5111627 commit ae621a2

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

lib/Target/R600/SIInsertWaits.cpp

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -302,21 +302,8 @@ static void increaseCounters(Counters &Dst, const Counters &Src) {
302302
Dst.Array[i] = std::max(Dst.Array[i], Src.Array[i]);
303303
}
304304

305-
bool SIInsertWaits::unorderedDefines(MachineInstr &MI) {
306-
307-
uint64_t TSFlags = TII->get(MI.getOpcode()).TSFlags;
308-
if (TSFlags & SIInstrFlags::LGKM_CNT)
309-
return true;
310-
311-
if (TSFlags & SIInstrFlags::EXP_CNT)
312-
return ExpInstrTypesSeen == 3;
313-
314-
return false;
315-
}
316-
317305
Counters SIInsertWaits::handleOperands(MachineInstr &MI) {
318306

319-
bool UnorderedDefines = unorderedDefines(MI);
320307
Counters Result = ZeroCounts;
321308

322309
// For each register affected by this
@@ -329,8 +316,7 @@ Counters SIInsertWaits::handleOperands(MachineInstr &MI) {
329316

330317
if (Op.isDef()) {
331318
increaseCounters(Result, UsedRegs[j]);
332-
if (UnorderedDefines)
333-
increaseCounters(Result, DefinedRegs[j]);
319+
increaseCounters(Result, DefinedRegs[j]);
334320
}
335321

336322
if (Op.isUse())

0 commit comments

Comments
 (0)