-
Notifications
You must be signed in to change notification settings - Fork 13.4k
[OpenMP] Prevent AMDGPU from overriding visibility on DT_nohost variables #68264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 c++ -triple nvptx-unknown-unknown -fopenmp-targets=nvptx-nvidia-cuda -emit-llvm %s -fopenmp-is-target-device -o - | FileCheck %s | ||
// RUN: %clang_cc1 -debug-info-kind=limited -verify -fopenmp -x c++ -triple amdgcn-amd-amdhsa -fopenmp-targets=amdgcn-amd-amdhsa -emit-llvm %s -fopenmp-is-target-device -o - | FileCheck %s | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe it is safer to have tests for both amdgcn and nvptx since they behave differently There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just added |
||
// expected-no-diagnostics | ||
|
||
|
||
|
@@ -21,6 +21,14 @@ void B::bar() { A a; a.foo(); } | |
void B::sbar() { A::sfoo(); } | ||
#pragma omp declare target to(B::bar, B::sbar) | ||
|
||
[[gnu::visibility("hidden")]] extern const int x = 0; | ||
#pragma omp declare target to(x) device_type(nohost) | ||
|
||
[[gnu::visibility("hidden")]] int y = 0; | ||
#pragma omp declare target to(y) | ||
|
||
// CHECK-DAG: @x = hidden{{.*}} constant i32 0 | ||
// CHECK-DAG: @y = protected{{.*}} i32 0 | ||
// CHECK-DAG: define hidden void @_ZN1B4sbarEv() | ||
// CHECK-DAG: define linkonce_odr hidden void @_ZN1A4sfooEv() | ||
// CHECK-DAG: define hidden void @_ZN1B3barEv( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this a spurious whitespace change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not here, above there's an extra line. I'll fix that before I land, not worth force pushing.