[llvm] [KernelInfo] Implement new LLVM IR pass for GPU code analysis (PR #102944)

Alex MacLean via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 27 16:59:09 PST 2025


================
@@ -322,6 +322,32 @@ void Module::eraseNamedMetadata(NamedMDNode *NMD) {
   eraseNamedMDNode(NMD);
 }
 
+SetVector<Function *> Module::getDeviceKernels() {
+  // TODO: Create a more cross-platform way of determining device kernels.
+  NamedMDNode *MD = getNamedMetadata("nvvm.annotations");
----------------
AlexMaclean wrote:

https://github.com/llvm/llvm-project/pull/119261 will auto-upgrade nvvm.annotations allowing you to only check the CC. Currently you'll still need to check both but hopefully soon only CC will be needed.

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


More information about the llvm-commits mailing list