-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Driver][PS5] Set visibility option defaults (#92091)
Adjust the PS5 driver defaults for the -fvisibility-from-dllstorageclass sub-options so that only globals with dllimport/dllexport annotations are adjusted. This allows globals without dllimport/export to retain the visibility and pre-emptability assigned during IR-Gen. Set -fvisibility=hidden on PS5 by default to compensate for no longer overriding the visibility of definitions without dllexport. Note there is no behavior change for PS4 (the behavior of overriding the visibility for all globals is retained on PS4).
- Loading branch information
1 parent
d3d6565
commit 384bf54
Showing
4 changed files
with
107 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/// Check PS4 specific interactions between visibility options. | ||
/// Detailed testing of -fvisibility-from-dllstorageclass is covered elsewhere. | ||
|
||
/// Check defaults. | ||
// RUN: %clang -### -target x86_64-scei-ps4 -x cl -c -emit-llvm %s 2>&1 | \ | ||
// RUN: FileCheck -check-prefix=DEFAULT %s --implicit-check-not=fvisibility --implicit-check-not=ftype-visibility --implicit-check-not=dllstorageclass | ||
// DEFAULT-DAG: "-fvisibility-from-dllstorageclass" | ||
// DEFAULT-DAG: "-fvisibility-dllexport=protected" | ||
// DEFAULT-DAG: "-fvisibility-nodllstorageclass=hidden" | ||
// DEFAULT-DAG: "-fvisibility-externs-dllimport=default" | ||
// DEFAULT-DAG: "-fvisibility-externs-nodllstorageclass=default" | ||
|
||
/// Check that -fvisibility-from-dllstorageclass is added in the presence of -fvisibility=. | ||
// RUN: %clang -### -target x86_64-scei-ps4 -x cl -c -emit-llvm -fvisibility=default %s 2>&1 | \ | ||
// RUN: FileCheck -check-prefixes=DEFAULT,VISEQUALS %s --implicit-check-not=fvisibility --implicit-check-not=ftype-visibility --implicit-check-not=dllstorageclass | ||
// VISEQUALS-DAG: "-fvisibility=default" | ||
|
||
/// Check that -fvisibility-from-dllstorageclass is added in the presence of -fvisibility-ms-compat. | ||
// RUN: %clang -### -target x86_64-scei-ps4 -x cl -c -emit-llvm -fvisibility-ms-compat %s 2>&1 | \ | ||
// RUN: FileCheck -check-prefixes=DEFAULT,MSCOMPT %s --implicit-check-not=fvisibility --implicit-check-not=ftype-visibility --implicit-check-not=dllstorageclass | ||
// MSCOMPT-DAG: "-fvisibility=hidden" | ||
// MSCOMPT-DAG: "-ftype-visibility=default" | ||
|
||
/// -fvisibility-from-dllstorageclass added explicitly. | ||
// RUN: %clang -### -target x86_64-scei-ps4 -x cl -c -emit-llvm -fvisibility-from-dllstorageclass %s 2>&1 | \ | ||
// RUN: FileCheck -check-prefixes=DEFAULT %s --implicit-check-not=fvisibility --implicit-check-not=ftype-visibility --implicit-check-not=dllstorageclass | ||
|
||
/// -fvisibility-from-dllstorageclass disabled explicitly. | ||
// RUN: %clang -### -target x86_64-scei-ps4 -x cl -c -emit-llvm -fno-visibility-from-dllstorageclass %s 2>&1 | \ | ||
// RUN: FileCheck -check-prefixes=NOVISFROM %s --implicit-check-not=fvisibility --implicit-check-not=ftype-visibility --implicit-check-not=dllstorageclass | ||
// NOVISFROM-NOT: "-fvisibility-from-dllstorageclass" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/// Check PS5 specific interactions between visibility options. | ||
/// Detailed testing of -fvisibility-from-dllstorageclass is covered elsewhere. | ||
|
||
/// Check defaults. | ||
// RUN: %clang -### -target x86_64-sie-ps5 -x cl -c -emit-llvm %s 2>&1 | \ | ||
// RUN: FileCheck -check-prefixes=VDEFAULT,VGND_DEFAULT,DEFAULT %s --implicit-check-not=fvisibility --implicit-check-not=ftype-visibility --implicit-check-not=dllstorageclass | ||
// VDEFAULT-DAG: "-fvisibility=hidden" | ||
// VGND_DEFAULT-DAG: "-fvisibility-global-new-delete=source" | ||
// DEFAULT-DAG: "-fvisibility-from-dllstorageclass" | ||
// DEFAULT-DAG: "-fvisibility-dllexport=protected" | ||
// DEFAULT-DAG: "-fvisibility-nodllstorageclass=keep" | ||
// DEFAULT-DAG: "-fvisibility-externs-dllimport=default" | ||
// DEFAULT-DAG: "-fvisibility-externs-nodllstorageclass=keep" | ||
|
||
/// -fvisibility= specified explicitly. | ||
// RUN: %clang -### -target x86_64-sie-ps5 -x cl -c -emit-llvm -fvisibility=protected %s 2>&1 | \ | ||
// RUN: FileCheck -check-prefixes=VPROTECTED,VGND_DEFAULT,DEFAULT %s --implicit-check-not=fvisibility --implicit-check-not=ftype-visibility --implicit-check-not=dllstorageclass | ||
// VPROTECTED-DAG: "-fvisibility=protected" | ||
|
||
/// -fvisibility-ms-compat added explicitly. | ||
// RUN: %clang -### -target x86_64-sie-ps5 -x cl -c -emit-llvm -fvisibility-ms-compat %s 2>&1 | \ | ||
// RUN: FileCheck -check-prefixes=MSCOMPT,VGND_DEFAULT,DEFAULT %s --implicit-check-not=fvisibility --implicit-check-not=ftype-visibility --implicit-check-not=dllstorageclass | ||
// MSCOMPT-DAG: "-fvisibility=hidden" | ||
// MSCOMPT-DAG: "-ftype-visibility=default" | ||
|
||
/// -fvisibility-from-dllstorageclass added explicitly. | ||
// RUN: %clang -### -target x86_64-sie-ps5 -x cl -c -emit-llvm -fvisibility-from-dllstorageclass %s 2>&1 | \ | ||
// RUN: FileCheck -check-prefixes=VDEFAULT,VGND_DEFAULT,DEFAULT %s --implicit-check-not=fvisibility --implicit-check-not=ftype-visibility --implicit-check-not=dllstorageclass | ||
|
||
/// -fvisibility-from-dllstorageclass disabled explicitly. | ||
// RUN: %clang -### -target x86_64-sie-ps5 -x cl -c -emit-llvm -fno-visibility-from-dllstorageclass %s 2>&1 | \ | ||
// RUN: FileCheck -check-prefixes=VDEFAULT,VGND_DEFAULT,NOVISFROM %s --implicit-check-not=fvisibility --implicit-check-not=ftype-visibility --implicit-check-not=dllstorageclass | ||
// NOVISFROM-NOT: "-fvisibility-from-dllstorageclass" |