[clang] [OpenMP] Prevent AMDGPU from overriding visibility on DT_nohost variables (PR #68264)

2023-10-05 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 closed https://github.com/llvm/llvm-project/pull/68264 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP] Prevent AMDGPU from overriding visibility on DT_nohost variables (PR #68264)

2023-10-05 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/68264 >From 5010ba6ec2f7370d2efc01d2fafb86d55c4dd883 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Wed, 4 Oct 2023 16:50:20 -0500 Subject: [PATCH] [OpenMP] Prevent AMDGPU from overriding visibility on DT_nohost

[clang] [OpenMP] Prevent AMDGPU from overriding visibility on DT_nohost variables (PR #68264)

2023-10-05 Thread Johannes Doerfert via cfe-commits
https://github.com/jdoerfert approved this pull request. LG if others don't object https://github.com/llvm/llvm-project/pull/68264 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP] Prevent AMDGPU from overriding visibility on DT_nohost variables (PR #68264)

2023-10-05 Thread Johannes Doerfert via cfe-commits
jdoerfert wrote: Seems reasonable to me. https://github.com/llvm/llvm-project/pull/68264 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP] Prevent AMDGPU from overriding visibility on DT_nohost variables (PR #68264)

2023-10-05 Thread Joseph Huber via cfe-commits
@@ -308,12 +308,13 @@ static bool requiresAMDGPUProtectedVisibility(const Decl *D, if (GV->getVisibility() != llvm::GlobalValue::HiddenVisibility) return false; - return D->hasAttr() || - (isa(D) && D->hasAttr()) || - (isa(D) && -

[clang] [OpenMP] Prevent AMDGPU from overriding visibility on DT_nohost variables (PR #68264)

2023-10-05 Thread Jon Chesterfield via cfe-commits
@@ -308,12 +308,13 @@ static bool requiresAMDGPUProtectedVisibility(const Decl *D, if (GV->getVisibility() != llvm::GlobalValue::HiddenVisibility) return false; - return D->hasAttr() || - (isa(D) && D->hasAttr()) || - (isa(D) && -

[clang] [OpenMP] Prevent AMDGPU from overriding visibility on DT_nohost variables (PR #68264)

2023-10-05 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/68264 >From ddccf41b5c3a198db80199d2432afe60c41cad7b Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Wed, 4 Oct 2023 16:50:20 -0500 Subject: [PATCH] [OpenMP] Prevent AMDGPU from overriding visibility on DT_nohost

[clang] [OpenMP] Prevent AMDGPU from overriding visibility on DT_nohost variables (PR #68264)

2023-10-05 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/68264 >From 52d11d0d975f03a3cd2760b42236b5ec8097331b Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Wed, 4 Oct 2023 16:50:20 -0500 Subject: [PATCH 1/2] [OpenMP] Prevent AMDGPU from overriding visibility on

[clang] [OpenMP] Prevent AMDGPU from overriding visibility on DT_nohost variables (PR #68264)

2023-10-05 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 5099dc341f7fa9baec160c2991072eb445469d46 0be9c9fc769eb580a602ce075d8904d683c3596b --

[clang] [OpenMP] Prevent AMDGPU from overriding visibility on DT_nohost variables (PR #68264)

2023-10-05 Thread Joseph Huber via cfe-commits
@@ -1,5 +1,5 @@ // RUN: %clang_cc1 -debug-info-kind=limited -verify -fopenmp -x c++ -triple nvptx64-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm %s -fopenmp-is-target-device -o - | FileCheck %s -// RUN: %clang_cc1 -debug-info-kind=limited -verify -fopenmp -x

[clang] [OpenMP] Prevent AMDGPU from overriding visibility on DT_nohost variables (PR #68264)

2023-10-05 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > This stuff looks very cuda/opencl specific. It's definitely surprising for > C++ code. Do we need it for openmp? If not it seems better to guard the hack > with visibility behind if (hip) You reminded me that I need to refine this logic as well. What it's doing here is

[clang] [OpenMP] Prevent AMDGPU from overriding visibility on DT_nohost variables (PR #68264)

2023-10-05 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/68264 >From 52d11d0d975f03a3cd2760b42236b5ec8097331b Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Wed, 4 Oct 2023 16:50:20 -0500 Subject: [PATCH 1/2] [OpenMP] Prevent AMDGPU from overriding visibility on

[clang] [OpenMP] Prevent AMDGPU from overriding visibility on DT_nohost variables (PR #68264)

2023-10-05 Thread Jon Chesterfield via cfe-commits
https://github.com/JonChesterfield commented: This stuff looks very cuda/opencl specific. It's definitely surprising for C++ code. Do we need it for openmp? If not it seems better to guard the hack with visibility behind if (hip) https://github.com/llvm/llvm-project/pull/68264

[clang] [OpenMP] Prevent AMDGPU from overriding visibility on DT_nohost variables (PR #68264)

2023-10-04 Thread Yaxun Liu via cfe-commits
@@ -1,5 +1,5 @@ // RUN: %clang_cc1 -debug-info-kind=limited -verify -fopenmp -x c++ -triple nvptx64-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm %s -fopenmp-is-target-device -o - | FileCheck %s -// RUN: %clang_cc1 -debug-info-kind=limited -verify -fopenmp -x

[clang] [OpenMP] Prevent AMDGPU from overriding visibility on DT_nohost variables (PR #68264)

2023-10-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Changes Summary: There's some logic in the AMDGPU target that manually resets the requested visibility of certain variables. This was triggering when we set a constant variable in OpenMP. However, we shouldn't do this for OpenMP when the variable

[clang] [OpenMP] Prevent AMDGPU from overriding visibility on DT_nohost variables (PR #68264)

2023-10-04 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/68264 Summary: There's some logic in the AMDGPU target that manually resets the requested visibility of certain variables. This was triggering when we set a constant variable in OpenMP. However, we shouldn't do this