[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.
This commit is contained in:
Sameer Sahasrabuddhe
2025-12-08 20:40:16 +05:30
parent a6fc5a1d77
commit 1ae957515c

View File

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