llvm.org GIT mirror llvm / e82b9c2
[instrprof] Use __{start,stop}_SECNAME on PS4 too. Summary: The PS4 linker seems to handle this fine. Hi David, it seems that indeed most ELF linkers support __{start,stop}_SECNAME, as our proprietary linker does as well. This follows the pattern of r250679 w.r.t. the testing. Maggie, Phillip, Paul: I've tested this with the PS4 SDK 3.5 toolchain prerelease and it seems to work fine. Reviewers: davidxl Subscribers: probinson, phillip.power, MaggieYi Differential Revision: http://reviews.llvm.org/D17672 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262112 91177308-0d34-0410-b5e6-96231b3b80d8 Sean Silva 4 years ago
2 changed file(s) with 6 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
405405
406406 // Use linker script magic to get data/cnts/name start/end.
407407 if (Triple(M->getTargetTriple()).isOSLinux() ||
408 Triple(M->getTargetTriple()).isOSFreeBSD())
408 Triple(M->getTargetTriple()).isOSFreeBSD() ||
409 Triple(M->getTargetTriple()).isPS4CPU())
409410 return;
410411
411412 // Construct the function.
22 ; RUN: opt < %s -mtriple=x86_64-apple-macosx10.10.0 -instrprof -S | FileCheck %s -check-prefix=MACHO
33 ; RUN: opt < %s -mtriple=x86_64-unknown-linux -instrprof -S | FileCheck %s -check-prefix=LINUX
44 ; RUN: opt < %s -mtriple=x86_64-unknown-freebsd -instrprof -S | FileCheck %s -check-prefix=FREEBSD
5 ; RUN: opt < %s -mtriple=x86_64-scei-ps4 -instrprof -S | FileCheck %s -check-prefix=PS4
56 ; RUN: opt < %s -mtriple=x86_64-pc-solaris -instrprof -S | FileCheck %s -check-prefix=SOLARIS
67
78 @__profn_foo = hidden constant [3 x i8] c"foo"
1415 ; MACHO: @__profd_foo = hidden {{.*}}, section "__DATA,__llvm_prf_data", align 8
1516 ; LINUX: @__profd_foo = hidden {{.*}}, section "__llvm_prf_data", align 8
1617 ; FREEBSD: @__profd_foo = hidden {{.*}}, section "__llvm_prf_data", align 8
18 ; PS4: @__profd_foo = hidden {{.*}}, section "__llvm_prf_data", align 8
1719 ; SOLARIS: @__profd_foo = hidden {{.*}}, section "__llvm_prf_data", align 8
1820
1921 ; ELF: @__llvm_prf_nm = private constant [{{.*}} x i8] c"{{.*}}", section "{{.*}}__llvm_prf_names"
3133 ; MACHO-NOT: define internal void @__llvm_profile_register_functions
3234 ; LINUX-NOT: define internal void @__llvm_profile_register_functions
3335 ; FREEBSD-NOT: define internal void @__llvm_profile_register_functions
36 ; PS4-NOT: define internal void @__llvm_profile_register_functions
3437 ; SOLARIS: define internal void @__llvm_profile_register_functions
3538
3639 ; MACHO-NOT: define internal void @__llvm_profile_init
3740 ; LINUX-NOT: define internal void @__llvm_profile_init
3841 ; FREEBSD-NOT: define internal void @__llvm_profile_init
42 ; PS4-NOT: define internal void @__llvm_profile_init
3943 ; SOLARIS: define internal void @__llvm_profile_init