[PATCH] D87674: [AMDGPU] Insert waitcnt after returning from call

Sebastian Neubauer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 16 01:14:24 PDT 2020


Flakebi added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp:846
 /// before returning.
-static bool callWaitsOnFunctionReturn(const MachineInstr &MI) {
-  return true;
-}
+static bool callWaitsOnFunctionReturn() { return false; }
 
----------------
arsenm wrote:
> Flakebi wrote:
> > arsenm wrote:
> > > In principle this depend on the calling convention, so should retain the argument
> > I guess `callWaitsOnFunctionEntry` should be similar but we do not have an instruction when it is called in `runOnMachineFunction`.
> > In the case `callWaitsOnFunctionEntry` or `callWaitsOnFunctionReturn` is called for a callee, we can pass the calling convention directly.
> > Can we get the calling convention somehow from a call instruction?
> I think you have to get it from the call target global (which may be null). We would probably need to track this in the call somehow
Should I do this as part of this patch or leave it for later, when a calling convention wants other behavior?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87674/new/

https://reviews.llvm.org/D87674



More information about the llvm-commits mailing list