[clang] [llvm] [Offload][PGO] Fix PGO on NVPTX targets (PR #143568)

Joseph Huber via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 23 10:23:22 PDT 2025


================
@@ -947,11 +954,18 @@ bool InstrLowerer::lower() {
   if (!ContainsProfiling && !CoverageNamesVar)
     return MadeChange;
 
+  // Cached info for generating delayed offset calculations
+  // This is only relevant on NVPTX targets
+  SmallVector<Function *> Kernels;
+  SmallVector<const InstrProfCntrInstBase *> ValueSites;
----------------
jhuber6 wrote:

Self-referential initializers are busted in PTX because whoever programmed it decided that it didn't work. The only way to work around it is to change how it's initialized to no longer be self-referential.

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


More information about the llvm-commits mailing list