[clang] [llvm] [Offload][PGO] Fix PGO on NVPTX targets (PR #143568)
Joseph Huber via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 10 09:46:35 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:
Right, seems like a surprising amount of code though. I would've just expected it to split up the initializer somehow. I.e.
```
int x[] = {0, x[0]}
```
Could be
```
int dummy = 0;
int x[] = {dummy, dummy};
```
or something?
https://github.com/llvm/llvm-project/pull/143568
More information about the llvm-commits
mailing list