aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineTraceMetrics.cpp
diff options
context:
space:
mode:
authorJoseph Huber <jhuber6@vols.utk.edu>2023-08-11 12:38:14 -0500
committerJoseph Huber <jhuber6@vols.utk.edu>2023-08-24 18:21:13 -0500
commit9da61aed751ea6a51e7fa2e970de896d3cc27791 (patch)
tree385adcbecab4e9f11a3e73e2f214ed63f4e18bb3 /llvm/lib/CodeGen/MachineTraceMetrics.cpp
parent63f0833ec4beb7d6bc63759ad8b336ad6dce0f93 (diff)
downloadllvm-9da61aed751ea6a51e7fa2e970de896d3cc27791.zip
llvm-9da61aed751ea6a51e7fa2e970de896d3cc27791.tar.gz
llvm-9da61aed751ea6a51e7fa2e970de896d3cc27791.tar.bz2
[OpenMP] Emit offloading entries for indirect target variables
OpenMP 5.1 allows emission of the `indirect` clause on declare target functions, see https://www.openmp.org/spec-html/5.1/openmpsu70.html#x98-1080002.14.7. The intended use of this is to permit calling device functions via their associated host pointer. In order to do this the first step will be building a map associating these variables. Doing this will require the same offloading entry handling we use for other kernels and globals. We intentionally emit a new global on the device side. Although it's possible to look up the device function's address directly, this would require changing the visibility and would prevent us from making static functions indirect. Also, the CUDA toolchain will optimize out unused functions and using a global prevents that. The downside is that the runtime will need to read the global and copy its value, but there shouldn't be any other costs. Note that this patch just performs the codegen, currently this new offloading entry type is unused and will be ignored by the runtime. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D157738
Diffstat (limited to 'llvm/lib/CodeGen/MachineTraceMetrics.cpp')
0 files changed, 0 insertions, 0 deletions