aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorSebastian Neubauer <sebastian.neubauer@amd.com>2020-09-04 12:36:29 +0200
committerSebastian Neubauer <sebastian.neubauer@amd.com>2020-09-23 12:17:59 +0200
commitca907bfb57d8ad3ec3bcc2cff2abab7b1b933af6 (patch)
tree12950d44a3a1816394f9782f7257543594f5821b /clang/lib/CodeGen/CodeGenModule.cpp
parent310af42ed9ab259ad05ed46d459203b3473ba66e (diff)
downloadllvm-ca907bfb57d8ad3ec3bcc2cff2abab7b1b933af6.zip
llvm-ca907bfb57d8ad3ec3bcc2cff2abab7b1b933af6.tar.gz
llvm-ca907bfb57d8ad3ec3bcc2cff2abab7b1b933af6.tar.bz2
[AMDGPU] Insert waitcnt after returning from call
When memory operations are outstanding on function calls, either the caller or the callee can insert a waitcnt to ensure that all reads are finished. Calls need some time to be executed, so if the callee inserts the waitcnt, filling the instruction buffer and waiting for memory will be interleaved, hiding some latency. This comes at the cost of having a waitcnt inside functions that may not be needed as no memory operations are outstanding. For function calls, this is already implemented. The same principal applies to returns: If the caller inserts a waitcnt after the call, the callee does not have to wait and the return and memory operation can be run in parallel. This commit implements waiting in the caller after returning from a function call. Differential Revision: https://reviews.llvm.org/D87674
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions