[PATCH] D87674: [AMDGPU] Insert waitcnt after returning from call
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 15 08:48:20 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:
> > 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
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