[llvm] [Offload] Introduce offload-tblgen and initial new API implementation (PR #108413)

Callum Fare via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 13 08:31:42 PDT 2024


================
@@ -0,0 +1,36 @@
+
+set(LLVM_TARGET_DEFINITIONS ${CMAKE_CURRENT_SOURCE_DIR}/API/OffloadAPI.td)
+list(APPEND LLVM_TABLEGEN_FLAGS -I ${CMAKE_CURRENT_SOURCE_DIR}/API)
+
+tablegen(OFFLOAD offload_api.h -gen-api)
+tablegen(OFFLOAD offload_funcs.inc -gen-func-names)
+tablegen(OFFLOAD offload_impl_func_decls.inc -gen-impl-func-decls)
+tablegen(OFFLOAD offload_entry_points.inc -gen-entry-points)
+tablegen(OFFLOAD offload_print.hpp -gen-print-header)
+
+
+add_public_tablegen_target(OffloadHeaderGen)
+
+add_llvm_library(offload_new SHARED
----------------
callumfare wrote:

I think it makes sense for this new interface to be `offload` with the existing OpenMP interface(s) staying in `omptarget`. But since the new API is nowhere near usable I wanted the name to indicate that and didn't have any better ideas, hence `offload_new`. I don't have strong feelings on this at all so happy to go with whatever others think.

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


More information about the llvm-commits mailing list