[llvm] [AMDGPU] Don't send DEALLOC_VGPRs after calls (PR #77439)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 9 03:04:52 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);
----------------
jayfoad wrote:

I suggest calling `setNonKernelFunctionInitialState` here (and renaming it to something like `setStateOnFunctionEntryOrReturn`).

https://github.com/llvm/llvm-project/pull/77439


More information about the llvm-commits mailing list