[llvm] [NVPTX] Enable .ptr .global .align attributes for kernel attributes for CUDA (PR #79646)

Artem Belevich via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 26 14:13:38 PST 2024


================
@@ -1610,6 +1610,10 @@ void NVPTXAsmPrinter::emitFunctionParamList(const Function *F, raw_ostream &O) {
             }
             Align ParamAlign = I->getParamAlign().valueOrOne();
             O << ".align " << ParamAlign.value() << " ";
+          } else if (I->getParamAlign().valueOrOne() != 1) {
----------------
Artem-B wrote:

We need a comment somewhere under `if (PTy)` explaining that CUDA kernels assume that pointers are in global AS, with the pointer to the docs. Otherwise it's confusing to see AS-specific pointer annotations above, but not here.

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


More information about the llvm-commits mailing list