[PATCH] D117048: [OpenMP] Link the bitcode library late for device LTO

Jon Chesterfield via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 11 16:29:06 PST 2022


JonChesterfield added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp:268
+  // Link the bitcode library late if we're using device LTO.
+  if (getDriver().isUsingLTO(/* IsOffload */ true))
+    return;
----------------
Can/should probably always link it late on amdgpu


================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:8159
+      std::string BitcodeSuffix;
+      if (TCArgs.hasFlag(options::OPT_fopenmp_target_new_runtime,
+                         options::OPT_fno_openmp_target_new_runtime, true))
----------------
This looks familiar - is there a function in commonargs that already does this?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D117048



More information about the cfe-commits mailing list