[Openmp-commits] [clang-tools-extra] [flang] [libcxx] [lld] [compiler-rt] [lldb] [clang] [llvm] [libc] [openmp] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)

Joseph Huber via Openmp-commits openmp-commits at lists.llvm.org
Mon Jan 8 20:15:44 PST 2024


================
@@ -58,6 +60,22 @@ class GlobalTy {
   void setPtr(void *P) { Ptr = P; }
 };
 
+typedef void *IntPtrT;
+struct __llvm_profile_data {
+#define INSTR_PROF_DATA(Type, LLVMType, Name, Initializer) Type Name;
+#include "llvm/ProfileData/InstrProfData.inc"
+};
+
+/// PGO profiling data extracted from a GPU device
+struct GPUProfGlobals {
+  std::string names;
+  std::vector<std::vector<int64_t>> counts;
+  std::vector<__llvm_profile_data> data;
+  Triple targetTriple;
+
----------------
jhuber6 wrote:

That's confusing, how would using a `std::vector` not have that problem as well? I'll need to look into that.

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


More information about the Openmp-commits mailing list