https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/93365
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/30] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/21] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/93365
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/29] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/20] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/93365
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/29] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough ready_for_review
https://github.com/llvm/llvm-project/pull/93365
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/93365
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/28] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/93365
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/27] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough created
https://github.com/llvm/llvm-project/pull/93365
This pull request is the second part of an ongoing effort to extends PGO
instrumentation to GPU device code and depends on #76587. This PR makes the
following changes:
- Introduces
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/20] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/20] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/18] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/18] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/18] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/18] Add profiling functions to libomptarget
@@ -2067,6 +2067,10 @@ Constant *ConstantExpr::getBitCast(Constant *C, Type
*DstTy,
Constant *ConstantExpr::getAddrSpaceCast(Constant *C, Type *DstTy,
bool OnlyIfReduced) {
+ // Skip cast if types are identical
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/17] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/16] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/15] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/15] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/14] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/14] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/13] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/13] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/13] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/12] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/11] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/11] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/10] Add profiling functions to libomptarget
@@ -959,8 +959,12 @@ void CodeGenPGO::emitCounterIncrement(CGBuilderTy
, const Stmt *S,
unsigned Counter = (*RegionCounterMap)[S];
- llvm::Value *Args[] = {FuncNameVar,
- Builder.getInt64(FunctionHash),
+ // Make sure that pointer to global is
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 1/9] Add profiling functions to libomptarget
@@ -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
@@ -163,3 +163,87 @@ Error
GenericGlobalHandlerTy::readGlobalFromImage(GenericDeviceTy ,
return Plugin::success();
}
+
+bool GenericGlobalHandlerTy::hasProfilingGlobals(GenericDeviceTy ,
+ DeviceImageTy ) {
+ GlobalTy
@@ -163,3 +163,87 @@ Error
GenericGlobalHandlerTy::readGlobalFromImage(GenericDeviceTy ,
return Plugin::success();
}
+
+bool GenericGlobalHandlerTy::hasProfilingGlobals(GenericDeviceTy ,
+ DeviceImageTy ) {
+ GlobalTy
@@ -163,3 +163,87 @@ Error
GenericGlobalHandlerTy::readGlobalFromImage(GenericDeviceTy ,
return Plugin::success();
}
+
+bool GenericGlobalHandlerTy::hasProfilingGlobals(GenericDeviceTy ,
+ DeviceImageTy ) {
+ GlobalTy
@@ -58,6 +60,22 @@ class GlobalTy {
void setPtr(void *P) { Ptr = P; }
};
+typedef void *IntPtrT;
EthanLuisMcDonough wrote:
`IntPtrT` isn't defined in `profile/InstrProfData.inc`. There are multiple
examples of this type being defined. before
@@ -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
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 1/8] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 1/8] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 1/7] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 1/6] Add profiling functions to libomptarget
@@ -428,13 +428,22 @@ std::string getPGOFuncNameVarName(StringRef FuncName,
return VarName;
}
+bool isGPUProfTarget(const Module ) {
+ const auto = M.getTargetTriple();
+ return triple.rfind("nvptx", 0) == 0 || triple.rfind("amdgcn", 0) == 0 ||
+
https://github.com/EthanLuisMcDonough created
https://github.com/llvm/llvm-project/pull/76587
This pull request is the first part of an ongoing effort to extends PGO
instrumentation to GPU device code. This PR makes the following changes:
- Adds blank registration functions to device RTL
-
Author: Ethan Luis McDonough
Date: 2023-02-21T16:14:19-06:00
New Revision: ce3a1c59e18027e7d18a2a0a99e4bc81ccc03491
URL:
https://github.com/llvm/llvm-project/commit/ce3a1c59e18027e7d18a2a0a99e4bc81ccc03491
DIFF:
44 matches
Mail list logo