summaryrefslogtreecommitdiff
path: root/clang/test/OpenMP/target_indirect_codegen.cpp
AgeCommit message (Collapse)Author
2025-10-13[clang][OMPIRBuilder] Fix two missed function pointer type issues (#162914)Nick Sarnie
Two small issues, when storing function pointers we need to use the program address space. With this change there are no asserts if I run all OpenMP tests with the offload target manually changed to SPIR-V, so we are getting somewhere. About 10 test fails though. Signed-off-by: Sarnie, Nick <nick.sarnie@intel.com>
2025-01-28[Offload] Rework offloading entry type to be more generic (#124018)Joseph Huber
Summary: The previous offloading entry type did not fit the current use-cases very well. This widens it and adds a version to prevent further annoyances. It also includes the kind to better sort who's using it. The first 64-bytes are reserved as zero so the OpenMP runtime can detect the old format for binary compatibilitry.
2024-05-04[test] %clang_cc1: remove redundant actionsFangrui Song
2024-04-09[Offload][NFC] Remove `omp_` prefix from offloading entries (#88071)Joseph Huber
Summary: These entires are generic for offloading with the new driver now. Having the `omp` prefix was a historical artifact and is confusing when used for CUDA. This patch just renames them for now, future patches will rework the binary format to make it more common.
2023-08-25[OpenMP][Fix] Update test after changing flag valueJoseph Huber
Summary: Comments on a previous patch suggested changing this flag but I neglected to update it in the Clang test accordingly. Fix this.
2023-08-24[OpenMP] Emit offloading entries for indirect target variablesJoseph Huber
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