[openmp] [clang] [llvm] [clang-tools-extra] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)

2023-12-29 Thread Ethan Luis McDonough via cfe-commits
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 - Giv

[llvm] [openmp] [clang] [clang-tools-extra] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)

2024-01-03 Thread Ethan Luis McDonough via cfe-commits
@@ -428,13 +428,22 @@ std::string getPGOFuncNameVarName(StringRef FuncName, return VarName; } +bool isGPUProfTarget(const Module &M) { + const auto &triple = M.getTargetTriple(); + return triple.rfind("nvptx", 0) == 0 || triple.rfind("amdgcn", 0) == 0 || + triple.r

[llvm] [clang] [openmp] [clang-tools-extra] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)

2024-01-03 Thread Ethan Luis McDonough via cfe-commits
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 --

[clang-tools-extra] [openmp] [llvm] [clang] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)

2024-01-03 Thread Ethan Luis McDonough via cfe-commits
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 --

[clang-tools-extra] [openmp] [llvm] [clang] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)

2024-01-03 Thread Ethan Luis McDonough via cfe-commits
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 --

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

2024-01-03 Thread Ethan Luis McDonough via cfe-commits
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 --

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

2024-01-04 Thread Ethan Luis McDonough via cfe-commits
@@ -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

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

2024-01-04 Thread Ethan Luis McDonough via cfe-commits
@@ -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 InstProfData.i

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

2024-01-04 Thread Ethan Luis McDonough via cfe-commits
@@ -163,3 +163,87 @@ Error GenericGlobalHandlerTy::readGlobalFromImage(GenericDeviceTy &Device, return Plugin::success(); } + +bool GenericGlobalHandlerTy::hasProfilingGlobals(GenericDeviceTy &Device, + DeviceImageTy &Image) {

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

2024-01-04 Thread Ethan Luis McDonough via cfe-commits
@@ -163,3 +163,87 @@ Error GenericGlobalHandlerTy::readGlobalFromImage(GenericDeviceTy &Device, return Plugin::success(); } + +bool GenericGlobalHandlerTy::hasProfilingGlobals(GenericDeviceTy &Device, + DeviceImageTy &Image) {

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

2024-01-04 Thread Ethan Luis McDonough via cfe-commits
@@ -163,3 +163,87 @@ Error GenericGlobalHandlerTy::readGlobalFromImage(GenericDeviceTy &Device, return Plugin::success(); } + +bool GenericGlobalHandlerTy::hasProfilingGlobals(GenericDeviceTy &Device, + DeviceImageTy &Image) {

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

2024-01-08 Thread Ethan Luis McDonough via cfe-commits
@@ -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

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

2024-01-09 Thread Ethan Luis McDonough via cfe-commits
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 --

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

2024-01-09 Thread Ethan Luis McDonough via cfe-commits
@@ -959,8 +959,12 @@ void CodeGenPGO::emitCounterIncrement(CGBuilderTy &Builder, const Stmt *S, unsigned Counter = (*RegionCounterMap)[S]; - llvm::Value *Args[] = {FuncNameVar, - Builder.getInt64(FunctionHash), + // Make sure that pointer to globa

[clang] [llvm] [openmp] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)

2024-02-13 Thread Ethan Luis McDonough via cfe-commits
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

[clang] [llvm] [openmp] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)

2024-02-27 Thread Ethan Luis McDonough via cfe-commits
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

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

2024-01-23 Thread Ethan Luis McDonough via cfe-commits
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

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

2024-01-23 Thread Ethan Luis McDonough via cfe-commits
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

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

2024-01-17 Thread Ethan Luis McDonough via cfe-commits
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

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

2024-01-17 Thread Ethan Luis McDonough via cfe-commits
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

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

2024-01-18 Thread Ethan Luis McDonough via cfe-commits
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

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

2024-01-18 Thread Ethan Luis McDonough via cfe-commits
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

[clang] ce3a1c5 - [flang] Handle unsupported warning flags

2023-02-21 Thread Ethan Luis McDonough via cfe-commits
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: https://github.com/llvm/llvm-project/commit/ce3a1c59e18027e7d18a2a0a99e4bc81ccc0349

[clang] [llvm] [openmp] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)

2024-02-13 Thread Ethan Luis McDonough via cfe-commits
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

[clang] [llvm] [openmp] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)

2024-02-15 Thread Ethan Luis McDonough via cfe-commits
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

[clang] [llvm] [openmp] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)

2024-02-15 Thread Ethan Luis McDonough via cfe-commits
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

[clang] [llvm] [openmp] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)

2024-02-15 Thread Ethan Luis McDonough via cfe-commits
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

[clang] [llvm] [openmp] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)

2024-02-15 Thread Ethan Luis McDonough via cfe-commits
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

[clang] [llvm] [openmp] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)

2024-02-16 Thread Ethan Luis McDonough via cfe-commits
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

[clang] [llvm] [openmp] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)

2024-02-16 Thread Ethan Luis McDonough via cfe-commits
@@ -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 EthanL

[clang] [llvm] [PGO][OpenMP] Instrumentation for GPU devices (Revision of #76587) (PR #102691)

2024-08-09 Thread Ethan Luis McDonough via cfe-commits
https://github.com/EthanLuisMcDonough created https://github.com/llvm/llvm-project/pull/102691 This pull request is a revised version of #76587. This pull request fixes some build issues that were present in the previous version of this change. > This pull request is the first part of an ongoi

[clang] [llvm] [PGO][OpenMP] Instrumentation for GPU devices (Revision of #76587) (PR #102691)

2024-08-09 Thread Ethan Luis McDonough via cfe-commits
https://github.com/EthanLuisMcDonough updated https://github.com/llvm/llvm-project/pull/102691 >From 24b1a99a1c014e1015fbba137430c5c6f3e414c5 Mon Sep 17 00:00:00 2001 From: Ethan Luis McDonough Date: Fri, 28 Jun 2024 12:39:19 -0500 Subject: [PATCH 1/4] Changes from old gpuprof branch --- clan

[clang] [llvm] [PGO][OpenMP] Instrumentation for GPU devices (Revision of #76587) (PR #102691)

2024-08-09 Thread Ethan Luis McDonough via cfe-commits
https://github.com/EthanLuisMcDonough updated https://github.com/llvm/llvm-project/pull/102691 >From 24b1a99a1c014e1015fbba137430c5c6f3e414c5 Mon Sep 17 00:00:00 2001 From: Ethan Luis McDonough Date: Fri, 28 Jun 2024 12:39:19 -0500 Subject: [PATCH 1/4] Changes from old gpuprof branch --- clan

[clang] [llvm] [PGO][OpenMP] Instrumentation for GPU devices (Revision of #76587) (PR #102691)

2024-08-09 Thread Ethan Luis McDonough via cfe-commits
https://github.com/EthanLuisMcDonough updated https://github.com/llvm/llvm-project/pull/102691 >From 24b1a99a1c014e1015fbba137430c5c6f3e414c5 Mon Sep 17 00:00:00 2001 From: Ethan Luis McDonough Date: Fri, 28 Jun 2024 12:39:19 -0500 Subject: [PATCH 1/5] Changes from old gpuprof branch --- clan

[clang] [compiler-rt] [llvm] [openmp] [PGO][Offload] Profile profraw generation for GPU instrumentation #76587 (PR #93365)

2024-05-27 Thread Ethan Luis McDonough via 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

[clang] [compiler-rt] [llvm] [openmp] [PGO][Offload] Profile profraw generation for GPU instrumentation #76587 (PR #93365)

2024-05-28 Thread Ethan Luis McDonough via cfe-commits
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

[clang] [compiler-rt] [llvm] [openmp] [PGO][Offload] Profile profraw generation for GPU instrumentation #76587 (PR #93365)

2024-05-28 Thread Ethan Luis McDonough via 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/29] Add profiling functions to libomptarget

[clang] [llvm] [openmp] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)

2024-05-31 Thread Ethan Luis McDonough via cfe-commits
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

[clang] [compiler-rt] [llvm] [openmp] [PGO][Offload] Profile profraw generation for GPU instrumentation #76587 (PR #93365)

2024-05-31 Thread Ethan Luis McDonough via 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/29] Add profiling functions to libomptarget

[clang] [llvm] [openmp] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)

2024-05-31 Thread Ethan Luis McDonough via cfe-commits
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

[clang] [compiler-rt] [llvm] [openmp] [PGO][Offload] Profile profraw generation for GPU instrumentation #76587 (PR #93365)

2024-05-31 Thread Ethan Luis McDonough via 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/30] Add profiling functions to libomptarget

[clang] [llvm] [PGO][OpenMP] Instrumentation for GPU devices (Revision of #76587) (PR #102691)

2024-08-27 Thread Ethan Luis McDonough via cfe-commits
@@ -985,7 +990,8 @@ void FunctionInstrumenter::instrument() { Intrinsic::getDeclaration(&M, PGOBlockCoverage ? Intrinsic::instrprof_cover : Intrinsic::instrprof_increment), -{Nam

[clang] [llvm] [openmp] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)

2024-05-06 Thread Ethan Luis McDonough via cfe-commits
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

[clang] [llvm] [openmp] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)

2024-05-09 Thread Ethan Luis McDonough via cfe-commits
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

[clang] [llvm] [openmp] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)

2024-05-13 Thread Ethan Luis McDonough via cfe-commits
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

[clang] [llvm] [openmp] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)

2024-05-21 Thread Ethan Luis McDonough via cfe-commits
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

[clang] [llvm] [openmp] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)

2024-05-21 Thread Ethan Luis McDonough via cfe-commits
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

[clang] [compiler-rt] [llvm] [openmp] [PGO][Offload] Profile profraw generation for GPU instrumentation #76587 (PR #93365)

2024-05-24 Thread Ethan Luis McDonough via cfe-commits
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 `__llvm_write_cust

[clang] [compiler-rt] [llvm] [openmp] [PGO][Offload] Profile profraw generation for GPU instrumentation #76587 (PR #93365)

2024-05-27 Thread Ethan Luis McDonough via 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/27] Add profiling functions to libomptarget

[clang] [llvm] [PGO][OpenMP] Instrumentation for GPU devices (Revision of #76587) (PR #102691)

2024-08-21 Thread Ethan Luis McDonough via cfe-commits
https://github.com/EthanLuisMcDonough updated https://github.com/llvm/llvm-project/pull/102691 >From 24b1a99a1c014e1015fbba137430c5c6f3e414c5 Mon Sep 17 00:00:00 2001 From: Ethan Luis McDonough Date: Fri, 28 Jun 2024 12:39:19 -0500 Subject: [PATCH 1/6] Changes from old gpuprof branch --- clan

[clang] [llvm] [PGO][OpenMP] Instrumentation for GPU devices (Revision of #76587) (PR #102691)

2024-08-21 Thread Ethan Luis McDonough via cfe-commits
https://github.com/EthanLuisMcDonough updated https://github.com/llvm/llvm-project/pull/102691 >From 24b1a99a1c014e1015fbba137430c5c6f3e414c5 Mon Sep 17 00:00:00 2001 From: Ethan Luis McDonough Date: Fri, 28 Jun 2024 12:39:19 -0500 Subject: [PATCH 1/6] Changes from old gpuprof branch --- clan

[clang] [llvm] [PGO][OpenMP] Instrumentation for GPU devices (Revision of #76587) (PR #102691)

2024-08-21 Thread Ethan Luis McDonough via cfe-commits
https://github.com/EthanLuisMcDonough closed https://github.com/llvm/llvm-project/pull/102691 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [openmp] [PGO][Offload] Add GPU profiling flags to driver (PR #94268)

2024-06-23 Thread Ethan Luis McDonough via cfe-commits
EthanLuisMcDonough wrote: @jhuber6 The clang format errors are mostly due to my local version of `clang-format` disagreeing with the buildbot's version. Its a bit annoying, but it shouldn't be too much of a problem given I plan on squashing and merging once this gets approved. I added new fla

[clang] [compiler-rt] [llvm] [openmp] [PGO][Offload] Add GPU profiling flags to driver (PR #94268)

2024-06-24 Thread Ethan Luis McDonough via cfe-commits
EthanLuisMcDonough wrote: > Is this something that specifically requires its own flag? Or could we just > do `-Xarch_device -fprofile-generate`. Right now the `-fprofile-generate-gpu` and `-fprofile-instr-generate-gpu` flags make sure that the compiler-rt profiling library is included even if

[clang] [llvm] [openmp] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)

2024-06-26 Thread Ethan Luis McDonough via cfe-commits
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/23] Add profiling functions to libomptarget

[clang] [compiler-rt] [llvm] [openmp] [PGO][Offload] Profile profraw generation for GPU instrumentation #76587 (PR #93365)

2024-06-27 Thread Ethan Luis McDonough via cfe-commits
https://github.com/EthanLuisMcDonough edited 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

[clang] [llvm] [openmp] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)

2024-06-28 Thread Ethan Luis McDonough via cfe-commits
https://github.com/EthanLuisMcDonough closed https://github.com/llvm/llvm-project/pull/76587 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [openmp] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)

2024-06-28 Thread Ethan Luis McDonough via cfe-commits
EthanLuisMcDonough wrote: Which platform are you building this on? https://github.com/llvm/llvm-project/pull/76587 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [openmp] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)

2024-06-28 Thread Ethan Luis McDonough via cfe-commits
EthanLuisMcDonough wrote: > I'm building on an x86 + AMD GPU. What fails is this command: > > ``` > [8/14] Performing build step for 'runtimes' > [1/4] Linking CXX shared library > /home/dobercea/upstream/llvm-project/build/lib/libomptarget.so.19.0git > FAILED: /home/dobercea/upstream/llvm-proj

[clang] 2c8b912 - Revert "[PGO][OpenMP] Instrumentation for GPU devices (#76587)"

2024-06-28 Thread Ethan Luis McDonough via cfe-commits
Author: Ethan Luis McDonough Date: 2024-06-28T12:30:45-05:00 New Revision: 2c8b912f630f9ec647a4870b9c5ee922c2ec1298 URL: https://github.com/llvm/llvm-project/commit/2c8b912f630f9ec647a4870b9c5ee922c2ec1298 DIFF: https://github.com/llvm/llvm-project/commit/2c8b912f630f9ec647a4870b9c5ee922c2ec129

[clang] [llvm] [openmp] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)

2024-06-28 Thread Ethan Luis McDonough via cfe-commits
EthanLuisMcDonough wrote: > Yes of course: > > ``` > cmake \ > -DCMAKE_BUILD_TYPE=Release \ > -DCMAKE_INSTALL_PREFIX=~/rocm/trunk_1.0 \ > -DLLVM_ENABLE_PROJECTS="clang;lld;llvm;clang-tools-extra;compiler-rt;flang" > \ > -DLLVM_LIT_ARGS="-vv --show-unsupported --show-xfail -j 32" \ > -

[clang] [compiler-rt] [llvm] [openmp] [PGO][Offload] Add GPU profiling flags to driver (PR #94268)

2024-11-01 Thread Ethan Luis McDonough via cfe-commits
EthanLuisMcDonough wrote: > For some codes, I get the following error for a gfx906: > > ``` > LLVM ERROR: Relocation for CG Profile could not be created: unknown > relocation name > ``` > > I see it for OpenMC, but the following is a simpler example: > > ``` > $ cat test.c > #include > #inc

[clang] [compiler-rt] [llvm] [openmp] [PGO][Offload] Add GPU profiling flags to driver (PR #94268)

2024-11-27 Thread Ethan Luis McDonough via cfe-commits
EthanLuisMcDonough wrote: > > > For some codes, I get the following error for a gfx906: > > > ``` > > > LLVM ERROR: Relocation for CG Profile could not be created: unknown > > > relocation name > > > ``` > > > Not sure if this is still relevant, but I think #114617 should fix this > > issue.

[clang] [compiler-rt] [PGO][Offload] Fix profile function visibility (PR #127257)

2025-02-16 Thread Ethan Luis McDonough via cfe-commits
https://github.com/EthanLuisMcDonough updated https://github.com/llvm/llvm-project/pull/127257 >From 2f747025061b8be4b4294bf6351e653f02349105 Mon Sep 17 00:00:00 2001 From: Ethan Luis McDonough Date: Fri, 14 Feb 2025 14:39:26 -0600 Subject: [PATCH] [PGO][Offload] Fix profile function visibility

[clang] [compiler-rt] [Darwin][PGO] Fix profile function visibility bug (PR #127257)

2025-02-16 Thread Ethan Luis McDonough via cfe-commits
https://github.com/EthanLuisMcDonough edited https://github.com/llvm/llvm-project/pull/127257 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [Darwin][PGO] Fix profile function visibility bug (PR #127257)

2025-02-16 Thread Ethan Luis McDonough via cfe-commits
https://github.com/EthanLuisMcDonough edited https://github.com/llvm/llvm-project/pull/127257 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [Clang][PGO] Fix profile function visibility bug (PR #127257)

2025-02-16 Thread Ethan Luis McDonough via cfe-commits
https://github.com/EthanLuisMcDonough edited https://github.com/llvm/llvm-project/pull/127257 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [Darwin][PGO] Fix profile function visibility bug (PR #127257)

2025-02-16 Thread Ethan Luis McDonough via cfe-commits
https://github.com/EthanLuisMcDonough ready_for_review https://github.com/llvm/llvm-project/pull/127257 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [openmp] [PGO][Offload] Profile profraw generation for GPU instrumentation #76587 (PR #93365)

2025-02-14 Thread Ethan Luis McDonough via cfe-commits
EthanLuisMcDonough wrote: Hi @dtellenbach and @qiongsiwu. Thank you for letting me know about this. I'm currently investigating the issue and trying to reproduce the issue locally on darwin. I'm going to try and fix this as soon as possible. https://github.com/llvm/llvm-project/pull/93365

[clang] [compiler-rt] [Clang][PGO] Fix profile function visibility bug (PR #127257)

2025-02-17 Thread Ethan Luis McDonough via cfe-commits
https://github.com/EthanLuisMcDonough closed https://github.com/llvm/llvm-project/pull/127257 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [openmp] [PGO][Offload] Add GPU profiling flags to driver (PR #94268)

2025-03-12 Thread Ethan Luis McDonough via cfe-commits
@@ -152,7 +152,7 @@ INSTR_PROF_VALUE_NODE(PtrToNodeT, llvm::PointerType::getUnqual(Ctx), Next, \ #define INSTR_PROF_DATA_DEFINED #endif INSTR_PROF_RAW_HEADER(uint64_t, Magic, __llvm_profile_get_magic()) -INSTR_PROF_RAW_HEADER(uint64_t, Version, __llvm_profile_get_version()) +I

[clang] [compiler-rt] [llvm] [PGO][Offload] Allow PGO flags to be used on GPU targets (PR #94268)

2025-03-18 Thread Ethan Luis McDonough via cfe-commits
https://github.com/EthanLuisMcDonough updated https://github.com/llvm/llvm-project/pull/94268 >From 3a2047c273d948d035b50eb486b772d5b3bdc401 Mon Sep 17 00:00:00 2001 From: Ethan Luis McDonough Date: Tue, 18 Mar 2025 16:20:14 -0500 Subject: [PATCH 1/3] [PGO][Offload] Allow PGO flags to be used o

[clang] [compiler-rt] [llvm] [PGO][Offload] Allow PGO flags to be used on GPU targets (PR #94268)

2025-03-19 Thread Ethan Luis McDonough via cfe-commits
https://github.com/EthanLuisMcDonough updated https://github.com/llvm/llvm-project/pull/94268 >From 3a2047c273d948d035b50eb486b772d5b3bdc401 Mon Sep 17 00:00:00 2001 From: Ethan Luis McDonough Date: Tue, 18 Mar 2025 16:20:14 -0500 Subject: [PATCH 1/5] [PGO][Offload] Allow PGO flags to be used o

[clang] [compiler-rt] [llvm] [PGO][Offload] Allow PGO flags to be used on GPU targets (PR #94268)

2025-03-19 Thread Ethan Luis McDonough via cfe-commits
@@ -152,7 +152,7 @@ INSTR_PROF_VALUE_NODE(PtrToNodeT, llvm::PointerType::getUnqual(Ctx), Next, \ #define INSTR_PROF_DATA_DEFINED #endif INSTR_PROF_RAW_HEADER(uint64_t, Magic, __llvm_profile_get_magic()) -INSTR_PROF_RAW_HEADER(uint64_t, Version, __llvm_profile_get_version()) +I

[clang] [compiler-rt] [llvm] [PGO][Offload] Allow PGO flags to be used on GPU targets (PR #94268)

2025-03-19 Thread Ethan Luis McDonough via cfe-commits
https://github.com/EthanLuisMcDonough updated https://github.com/llvm/llvm-project/pull/94268 >From 3a2047c273d948d035b50eb486b772d5b3bdc401 Mon Sep 17 00:00:00 2001 From: Ethan Luis McDonough Date: Tue, 18 Mar 2025 16:20:14 -0500 Subject: [PATCH 1/4] [PGO][Offload] Allow PGO flags to be used o

[clang] [compiler-rt] [llvm] [openmp] [PGO][Offload] Add GPU profiling flags to driver (PR #94268)

2025-03-18 Thread Ethan Luis McDonough via cfe-commits
https://github.com/EthanLuisMcDonough edited https://github.com/llvm/llvm-project/pull/94268 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [openmp] [PGO][Offload] Allow PGO flags to be used on GPU targets (PR #94268)

2025-03-18 Thread Ethan Luis McDonough via cfe-commits
https://github.com/EthanLuisMcDonough edited https://github.com/llvm/llvm-project/pull/94268 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [openmp] [PGO][Offload] Profile profraw generation for GPU instrumentation #76587 (PR #93365)

2025-03-24 Thread Ethan Luis McDonough via cfe-commits
EthanLuisMcDonough wrote: > @EthanLuisMcDonough I think your patch effectively introduces a dependency on > libc because `__llvm_write_custom_profile` has `__attribute__((used))` but > calls e.g. `atoi` through `setupIOBuffer`. > > In compiler-rt it's not safe to make that assumption because i

[clang] [compiler-rt] [PGO][Offload] Hide GPU entrypoint on Darwin (PR #132966)

2025-03-25 Thread Ethan Luis McDonough via cfe-commits
https://github.com/EthanLuisMcDonough created https://github.com/llvm/llvm-project/pull/132966 This PR partially reverts 83e180c and instead opts to hide the GPU entry point on Darwin platforms. Marking `__llvm_write_custom_profile` as used was causing issues on embedded platforms. >From e418

[clang] [compiler-rt] [PGO][Offload] Hide GPU entrypoint on Darwin (PR #132966)

2025-03-25 Thread Ethan Luis McDonough via cfe-commits
https://github.com/EthanLuisMcDonough updated https://github.com/llvm/llvm-project/pull/132966 >From e418000ddb31f6df2aa96061bea6fcc56d7b09a9 Mon Sep 17 00:00:00 2001 From: Ethan Luis McDonough Date: Tue, 25 Mar 2025 12:41:59 -0500 Subject: [PATCH 1/2] [PGO][Offload] Hide GPU entrypoint on Darw

[clang] [compiler-rt] [PGO][Offload] Hide GPU entrypoint on Darwin (PR #132966)

2025-03-25 Thread Ethan Luis McDonough via cfe-commits
@@ -1273,6 +1273,7 @@ COMPILER_RT_VISIBILITY int __llvm_profile_set_file_object(FILE *File, return 0; } +#ifdef COMPILER_RT_GPU_ENTRYPOINT EthanLuisMcDonough wrote: My reasoning was that it would give us more configuration power if we had a macro that was

[clang] [compiler-rt] [llvm] [PGO][Offload] Allow PGO flags to be used on GPU targets (PR #94268)

2025-03-28 Thread Ethan Luis McDonough via cfe-commits
EthanLuisMcDonough wrote: Thank you all for making me aware of this. I'll look into fixing this as soon as possible. https://github.com/llvm/llvm-project/pull/94268 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang] [compiler-rt] [llvm] [PGO][Offload] Allow PGO flags to be used on GPU targets (PR #94268)

2025-03-28 Thread Ethan Luis McDonough via cfe-commits
EthanLuisMcDonough wrote: This patch should disable PGO on nvidia targets: https://github.com/llvm/llvm-project/pull/133522. I'll merge it after I'm done running some tests https://github.com/llvm/llvm-project/pull/94268 ___ cfe-commits mailing list

[clang] [llvm] [PGO][Offload] Disable PGO on NVPTX (PR #133522)

2025-03-28 Thread Ethan Luis McDonough via cfe-commits
https://github.com/EthanLuisMcDonough closed https://github.com/llvm/llvm-project/pull/133522 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [PGO][Offload] Hide GPU entrypoint on Darwin (PR #132966)

2025-04-05 Thread Ethan Luis McDonough via cfe-commits
EthanLuisMcDonough wrote: > It worked before your patch right? Is this what it exposed before then? In 83e180c, I marked `__llvm_write_custom_profile` as used, which fixed the Darwin code stripping bug but broke the library on embedded systems. In c50d39f, I removed the used attribute, which b

[clang] [llvm] [PGO][Offload] Disable PGO on NVPTX (PR #133522)

2025-04-05 Thread Ethan Luis McDonough via cfe-commits
https://github.com/EthanLuisMcDonough created https://github.com/llvm/llvm-project/pull/133522 None >From d21330ea2a3d2cd7ea035361e239bb3da16fbb9f Mon Sep 17 00:00:00 2001 From: Ethan Luis McDonough Date: Fri, 28 Mar 2025 16:17:44 -0500 Subject: [PATCH] [PGO][Offload] Disable PGO on NVPTX ---