[llvm] [NVPTX] Allow the ctor/dtor lowering pass to emit kernels (PR #71549)

Artem Belevich via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 9 12:24:07 PST 2023


================
@@ -32,6 +33,11 @@ static cl::opt<std::string>
               cl::desc("Override unique ID of ctor/dtor globals."),
               cl::init(""), cl::Hidden);
 
+static cl::opt<bool>
+    CreateKernels("nvptx-lower-global-kernel",
----------------
Artem-B wrote:

Naming is hard...
"nvptx-lower-global-kernel" is shorter, but still sounds odd to me. What *is* a global kernel? And what does it mean to "lower" it. While you and I have enough context to make sense of it all, it will not be the case for the end user who would have no clue what the heck is lowering and what does it have to do with a global kernel, whatever that is.

The key here, IMO, is that it's a knob to "make global initializers work", and that's what the name should reflect. It does not need to describe *how* we're going to do it. 

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


More information about the llvm-commits mailing list