[Mlir-commits] [mlir] [mlir][gpu] Add the `OffloadEmbeddingAttr` offloading translation attr (PR #78117)

Joseph Huber llvmlistbot at llvm.org
Tue Feb 20 08:02:19 PST 2024


================
@@ -0,0 +1,61 @@
+//===- Offload.h - LLVM Target Offload --------------------------*- C++ -*-===//
----------------
jhuber6 wrote:

I don't have the full view of what LLJIT does here, but the use-case in `clang` is that we need each TU to be able to emit values that need to be registered by the runtime. There are a few alternate solutions to this, but having the linker handle it is the best overall. The rework I was talking about was to simply change the offloading entry struct so it's more generic.

How does LLJIT work exactly? If you put globals into a section they will generally appear in order, so if you had a pointer to the first and last globals in that section you could just traverse it once it's gone through the backend. This is somewhat similar to the COFF linker handling which just gives an object at the beginning and end of the others in that section.

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


More information about the Mlir-commits mailing list