Skip to content

Commit 1ae9575

Browse files
committed
[AMDGPU][NFC] Update a comment about FLAT v/s LDSDMA
The change in #170263 does not do justice to common knowledge in the backend. Fix the comment to reflect the relation between FLAT encoding, flat pointer access, and LDSDMA operations.
1 parent a6fc5a1 commit 1ae9575

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2297,12 +2297,11 @@ void SIInsertWaitcnts::updateEventWaitcntAfter(MachineInstr &Inst,
22972297
ScoreBrackets->updateByEvent(LDS_ACCESS, Inst);
22982298
}
22992299

2300-
// If this is a truly flat memory operation, then it accesss both VMEM and
2301-
// LDS, so note it - it will require that both the VM and LGKM be flushed to
2302-
// zero if it is pending when a VM or LGKM dependency occurs.
2303-
//
2304-
// For example, LDS DMA operations have FLAT set in their TSFlags for
2305-
// unspecified reasons, but they are not flat operations)
2300+
// Async/LDSDMA operations have FLAT encoding but do not actually use flat
2301+
// pointers. They do have two operands that each access global and LDS, thus
2302+
// making it appear at this point that they are using a flat pointer. Filter
2303+
// them out, and for the rest, generate a dependency on flat pointers so
2304+
// that both VM and LGKM counters are flushed.
23062305
if (!SIInstrInfo::isLDSDMA(Inst) && FlatASCount > 1)
23072306
ScoreBrackets->setPendingFlat();
23082307
} else if (SIInstrInfo::isVMEM(Inst) &&

0 commit comments

Comments
 (0)