[llvm] [AMDGPU] Don't send DEALLOC_VGPRs after calls (PR #77439)
Jannik Silvanus via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 9 03:01:49 PST 2024
================
@@ -1487,6 +1488,9 @@ void SIInsertWaitcnts::updateEventWaitcntAfter(MachineInstr &Inst,
if (callWaitsOnFunctionReturn(Inst)) {
// Act as a wait on everything
ScoreBrackets->applyWaitcnt(AMDGPU::Waitcnt::allZeroExceptVsCnt());
+ // Since there's no guaranteed wait on VsCnt, scratch stores might still
+ // be in flight.
+ ScoreBrackets->setPendingEvent(SCRATCH_WRITE_ACCESS);
----------------
jasilvanus wrote:
Nit: There could also be in-flight global non-scratch stores, correct?
The comment on `SCRATCH_WRITE_ACCESS` says `vector-memory write that may be scratch` so these should be covered, but I wonder whether we should still explicitly include `VMEM_WRITE_ACCESS`.
https://github.com/llvm/llvm-project/pull/77439
More information about the llvm-commits
mailing list