[Openmp-commits] [clang] [llvm] [openmp] ReworkCtorDtor (PR #71739)

Joseph Huber via Openmp-commits openmp-commits at lists.llvm.org
Wed Nov 8 14:26:09 PST 2023

@@ -95,7 +95,7 @@ using namespace llvm;
 static cl::opt<bool>
                   cl::desc("Lower GPU ctor / dtors to globals on the device."),
-                  cl::init(false), cl::Hidden);
+                  cl::init(true), cl::Hidden);
jhuber6 wrote:

This was the easiest way to get the desired effect. Passing `--nvptx-lower-glocal-ctor-dtor` is subtly broken because I think it will fail if the user didn't build with the NVPTX target. The OpenMP runtime is supposed to be buildable for NVPTX even without backend support so I was worried it would degrade that. Do you think I could check for `openmp` module data and set it based off of that? OpenMP always emits an `openmp` global flag.


More information about the Openmp-commits mailing list