[PATCH] D139287: [WIP][OpenMP] Introduce basic JIT support to OpenMP target offloading

Shilei Tian via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Dec 4 19:29:13 PST 2022


tianshilei1992 added inline comments.


================
Comment at: clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp:879
                                "Cannot embed bitcode with multiple files.");
-    OutputFiles.push_back(static_cast<std::string>(BitcodeOutput.front()));
+    OutputFiles.push_back(Args.MakeArgString(BitcodeOutput.front()));
     return Error::success();
----------------
This will be pushed by Joseph in another patch.


================
Comment at: openmp/libomptarget/plugins-nextgen/common/PluginInterface/CMakeLists.txt:24
 # Plugin Interface library.
-add_library(PluginInterface OBJECT PluginInterface.cpp GlobalHandler.cpp)
+add_llvm_library(PluginInterface OBJECT PluginInterface.cpp GlobalHandler.cpp JIT.cpp)
 
----------------
I guess this might cause the issue of non-protected global symbols.


================
Comment at: openmp/libomptarget/plugins-nextgen/common/PluginInterface/JIT.cpp:184
+
+  auto AddStream =
+      [&](size_t Task,
----------------
Is there any way that we don't write it to a file here?


================
Comment at: openmp/libomptarget/plugins-nextgen/common/PluginInterface/JIT.cpp:255
+
+  if (ActualTriple.starts_with(Triple)) {
+    BitcodeImageMap[Image->ImageStart] = ActualTriple;
----------------
Is there better way to compare two triples?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139287/new/

https://reviews.llvm.org/D139287



More information about the cfe-commits mailing list