aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
authorJon Chesterfield <jonathanchesterfield@gmail.com>2021-11-22 23:00:19 +0000
committerJon Chesterfield <jonathanchesterfield@gmail.com>2021-11-22 23:00:20 +0000
commitae5348a38eb1668cd9042d9a5207dc32bc4edb87 (patch)
treea09f44ea6de073f2f77179df98c1371e8ae5d228 /llvm/lib/CodeGen/MachineFunction.cpp
parent7aafe467d2aa6307d34c5762b8c3bf843d713737 (diff)
downloadllvm-ae5348a38eb1668cd9042d9a5207dc32bc4edb87.zip
llvm-ae5348a38eb1668cd9042d9a5207dc32bc4edb87.tar.gz
llvm-ae5348a38eb1668cd9042d9a5207dc32bc4edb87.tar.bz2
[openmp][amdgpu] Make plugin robust to presence of explicit implicit arguments
OpenMP (compiler) does not currently request any implicit kernel arguments. OpenMP (runtime) allocates and initialises a reasonable guess at the implicit kernel arguments anyway. This change makes the plugin check the number of explicit arguments, instead of all arguments, and puts the pointer to hostcall buffer in both the current location and at the offset expected when implicit arguments are added to the metadata by D113538. This is intended to keep things running while fixing the oversight in the compiler (in D113538). Once that patch lands, and a following one marks openmp kernels that use printf such that the backend emits an args element with the right type (instead of hidden_node), the over-allocation can be removed and the hardcoded 8*e+3 offset replaced with one read from the .offset of the corresponding metadata element. Reviewed By: estewart08 Differential Revision: https://reviews.llvm.org/D114274
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
0 files changed, 0 insertions, 0 deletions