[PATCH] D25456: [InstrProf] Add support for dead_strip+live_support functionality

Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 11 14:57:25 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL283947: [InstrProf] Add support for dead_strip+live_support functionality (authored by vedantk).

Changed prior to commit:
  https://reviews.llvm.org/D25456?vs=74191&id=74302#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D25456

Files:
  llvm/trunk/include/llvm/ProfileData/InstrProf.h
  llvm/trunk/test/Instrumentation/InstrProfiling/PR23499.ll
  llvm/trunk/test/Instrumentation/InstrProfiling/platform.ll
  llvm/trunk/test/Instrumentation/InstrProfiling/profiling.ll


Index: llvm/trunk/include/llvm/ProfileData/InstrProf.h
===================================================================
--- llvm/trunk/include/llvm/ProfileData/InstrProf.h
+++ llvm/trunk/include/llvm/ProfileData/InstrProf.h
@@ -55,6 +55,7 @@
 /// data.
 inline StringRef getInstrProfDataSectionName(bool AddSegment) {
   return AddSegment ? "__DATA," INSTR_PROF_DATA_SECT_NAME_STR
+                      ",regular,live_support"
                     : INSTR_PROF_DATA_SECT_NAME_STR;
 }
 
Index: llvm/trunk/test/Instrumentation/InstrProfiling/platform.ll
===================================================================
--- llvm/trunk/test/Instrumentation/InstrProfiling/platform.ll
+++ llvm/trunk/test/Instrumentation/InstrProfiling/platform.ll
@@ -18,7 +18,7 @@
 ; MACHO: @__profc_foo = hidden global [1 x i64] zeroinitializer, section "__DATA,__llvm_prf_cnts", align 8
 ; ELF: @__profc_foo = hidden global [1 x i64] zeroinitializer, section "__llvm_prf_cnts", align 8
 
-; MACHO: @__profd_foo = hidden {{.*}}, section "__DATA,__llvm_prf_data", align 8
+; MACHO: @__profd_foo = hidden {{.*}}, section "__DATA,__llvm_prf_data,regular,live_support", align 8
 ; LINUX: @__profd_foo = hidden {{.*}}, section "__llvm_prf_data", align 8
 ; FREEBSD: @__profd_foo = hidden {{.*}}, section "__llvm_prf_data", align 8
 ; PS4: @__profd_foo = hidden {{.*}}, section "__llvm_prf_data", align 8
Index: llvm/trunk/test/Instrumentation/InstrProfiling/PR23499.ll
===================================================================
--- llvm/trunk/test/Instrumentation/InstrProfiling/PR23499.ll
+++ llvm/trunk/test/Instrumentation/InstrProfiling/PR23499.ll
@@ -15,13 +15,13 @@
 
 ; CHECK: @__profn__Z3barIvEvv = private constant [11 x i8] c"_Z3barIvEvv", align 1
 ; CHECK: @__profc__Z3barIvEvv = linkonce_odr hidden global [1 x i64] zeroinitializer, section "{{.*}}__llvm_prf_cnts", comdat($__profv__Z3barIvEvv), align 8
-; CHECK: @__profd__Z3barIvEvv = linkonce_odr hidden global { i64, i64, i64*, i8*, i8*, i32, [1 x i16] } { i64 4947693190065689389, i64 0, i64* getelementptr inbounds ([1 x i64], [1 x i64]* @__profc__Z3barIvEvv, i32 0, i32 0), i8*{{.*}}, i8* null, i32 1, [1 x i16] zeroinitializer }, section "{{.*}}__llvm_prf_data", comdat($__profv__Z3barIvEvv), align 8
+; CHECK: @__profd__Z3barIvEvv = linkonce_odr hidden global { i64, i64, i64*, i8*, i8*, i32, [1 x i16] } { i64 4947693190065689389, i64 0, i64* getelementptr inbounds ([1 x i64], [1 x i64]* @__profc__Z3barIvEvv, i32 0, i32 0), i8*{{.*}}, i8* null, i32 1, [1 x i16] zeroinitializer }, section "{{.*}}__llvm_prf_data{{.*}}", comdat($__profv__Z3barIvEvv), align 8
 ; CHECK: @__llvm_prf_nm = private constant [{{.*}} x i8] c"{{.*}}", section "{{.*}}__llvm_prf_names"
 
 
 ; COFF: @__profn__Z3barIvEvv = private constant [11 x i8] c"_Z3barIvEvv", align 1
 ; COFF: @__profc__Z3barIvEvv = linkonce_odr hidden global [1 x i64] zeroinitializer, section "{{.*}}__llvm_prf_cnts", comdat, align 8
-; COFF: @__profd__Z3barIvEvv = linkonce_odr hidden global { i64, i64, i64*, i8*, i8*, i32, [1 x i16] } { i64 4947693190065689389, i64 0, i64* getelementptr inbounds ([1 x i64], [1 x i64]* @__profc__Z3barIvEvv, i32 0, i32 0), i8*{{.*}}, i8* null, i32 1, [1 x i16] zeroinitializer }, section "{{.*}}__llvm_prf_data", comdat($__profc__Z3barIvEvv), align 8
+; COFF: @__profd__Z3barIvEvv = linkonce_odr hidden global { i64, i64, i64*, i8*, i8*, i32, [1 x i16] } { i64 4947693190065689389, i64 0, i64* getelementptr inbounds ([1 x i64], [1 x i64]* @__profc__Z3barIvEvv, i32 0, i32 0), i8*{{.*}}, i8* null, i32 1, [1 x i16] zeroinitializer }, section "{{.*}}__llvm_prf_data{{.*}}", comdat($__profc__Z3barIvEvv), align 8
 
 
 declare void @llvm.instrprof.increment(i8*, i64, i32, i32) #1
Index: llvm/trunk/test/Instrumentation/InstrProfiling/profiling.ll
===================================================================
--- llvm/trunk/test/Instrumentation/InstrProfiling/profiling.ll
+++ llvm/trunk/test/Instrumentation/InstrProfiling/profiling.ll
@@ -11,21 +11,21 @@
 ; CHECK: @__profn_baz = private constant [3 x i8] c"baz"
 
 ; CHECK: @__profc_foo = hidden global [1 x i64] zeroinitializer, section "__DATA,__llvm_prf_cnts", align 8
-; CHECK: @__profd_foo = hidden {{.*}}, section "__DATA,__llvm_prf_data", align 8
+; CHECK: @__profd_foo = hidden {{.*}}, section "__DATA,__llvm_prf_data,regular,live_support", align 8
 define void @foo() {
   call void @llvm.instrprof.increment(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @__profn_foo, i32 0, i32 0), i64 0, i32 1, i32 0)
   ret void
 }
 
 ; CHECK: @__profc_bar = hidden global [1 x i64] zeroinitializer, section "__DATA,__llvm_prf_cnts", align 8
-; CHECK: @__profd_bar = hidden {{.*}}, section "__DATA,__llvm_prf_data", align 8
+; CHECK: @__profd_bar = hidden {{.*}}, section "__DATA,__llvm_prf_data,regular,live_support", align 8
 define void @bar() {
   call void @llvm.instrprof.increment(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @__profn_bar, i32 0, i32 0), i64 0, i32 1, i32 0)
   ret void
 }
 
 ; CHECK: @__profc_baz = hidden global [3 x i64] zeroinitializer, section "__DATA,__llvm_prf_cnts", align 8
-; CHECK: @__profd_baz = hidden {{.*}}, section "__DATA,__llvm_prf_data", align 8
+; CHECK: @__profd_baz = hidden {{.*}}, section "__DATA,__llvm_prf_data,regular,live_support", align 8
 define void @baz() {
   call void @llvm.instrprof.increment(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @__profn_baz, i32 0, i32 0), i64 0, i32 3, i32 0)
   call void @llvm.instrprof.increment(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @__profn_baz, i32 0, i32 0), i64 0, i32 3, i32 1)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25456.74302.patch
Type: text/x-patch
Size: 5599 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161011/83719ba8/attachment.bin>


More information about the llvm-commits mailing list