[clang] [llvm] [Offload] Rework offloading entry type to be more generic (PR #124018)

Joseph Huber via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 22 15:59:02 PST 2025


================
@@ -55,29 +68,30 @@ enum OffloadEntryKindFlag : uint32_t {
 /// globals that will be registered with the offloading runtime.
 StructType *getEntryTy(Module &M);
 
-/// Returns the struct type we store the two pointers for CUDA / HIP managed
-/// variables in. Necessary until we widen the offload entry struct.
-StructType *getManagedTy(Module &M);
-
 /// Create an offloading section struct used to register this global at
 /// runtime.
 ///
 /// \param M The module to be used
 /// \param Addr The pointer to the global being registered.
+/// \param Kind The offloading language expected to consume this.
----------------
jhuber6 wrote:

My ultimate goal is to make all of these go to a single section called `offloading_entries` and then register conditionally on the kind. It may be worthwhile to change this to be a bitfield, though it might break existing `.o` files since it's based on the OffloadBinary enum which doesn't specify it. Could do that in a separate patch.

https://github.com/llvm/llvm-project/pull/124018


More information about the llvm-commits mailing list