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

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 16 07:28:26 PDT 2020


arsenm 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; }
 
----------------
Flakebi wrote:
> 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?
It's a separate change. Should add a fixme that this is a function of the calling convention


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