diff options
| author | Xinliang David Li <davidxl@google.com> | 2015-12-12 17:28:03 +0000 |
|---|---|---|
| committer | Xinliang David Li <davidxl@google.com> | 2015-12-12 17:28:03 +0000 |
| commit | d1bab9604547228c9b0191ee5ffaf7f4a87dbef2 (patch) | |
| tree | 9c93246c88b2ac7bc53d761cf69440031503c470 /llvm/test/Instrumentation/InstrProfiling | |
| parent | 1d49fc9b2774bbdabab2fc816d25f360d80712c9 (diff) | |
| download | bcm5719-llvm-d1bab9604547228c9b0191ee5ffaf7f4a87dbef2.tar.gz bcm5719-llvm-d1bab9604547228c9b0191ee5ffaf7f4a87dbef2.zip | |
[PGO] Stop using invalid char in instr variable names.
Before the patch, -fprofile-instr-generate compile will fail
if no integrated-as is specified when the file contains
any static functions (the -S output is also invalid).
This is the second try. The fix in this patch is very localized.
Only profile symbol names of profile symbols with internal
linkage are fixed up while initializer of name syms are not
changes. This means there is no format change nor version bump.
llvm-svn: 255434
Diffstat (limited to 'llvm/test/Instrumentation/InstrProfiling')
| -rw-r--r-- | llvm/test/Instrumentation/InstrProfiling/profiling.ll | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/test/Instrumentation/InstrProfiling/profiling.ll b/llvm/test/Instrumentation/InstrProfiling/profiling.ll index cae103ab667..e1cbf851179 100644 --- a/llvm/test/Instrumentation/InstrProfiling/profiling.ll +++ b/llvm/test/Instrumentation/InstrProfiling/profiling.ll @@ -6,8 +6,8 @@ target triple = "x86_64-apple-macosx10.10.0" ; CHECK: @__llvm_profile_name_foo = hidden constant [3 x i8] c"foo", section "__DATA,__llvm_prf_names", align 1 @__llvm_profile_name_bar = hidden constant [4 x i8] c"bar\00" ; CHECK: @__llvm_profile_name_bar = hidden constant [4 x i8] c"bar\00", section "__DATA,__llvm_prf_names", align 1 -@baz_prof_name = hidden constant [3 x i8] c"baz" -; CHECK: @baz_prof_name = hidden constant [3 x i8] c"baz", section "__DATA,__llvm_prf_names", align 1 +@__llvm_profile_name_baz = hidden constant [3 x i8] c"baz" +; CHECK: @__llvm_profile_name_baz = hidden constant [3 x i8] c"baz", section "__DATA,__llvm_prf_names", align 1 ; CHECK: @__llvm_profile_counters_foo = hidden global [1 x i64] zeroinitializer, section "__DATA,__llvm_prf_cnts", align 8 ; CHECK: @__llvm_profile_data_foo = hidden {{.*}}, section "__DATA,__llvm_prf_data", align 8 @@ -26,9 +26,9 @@ define void @bar() { ; CHECK: @__llvm_profile_counters_baz = hidden global [3 x i64] zeroinitializer, section "__DATA,__llvm_prf_cnts", align 8 ; CHECK: @__llvm_profile_data_baz = hidden {{.*}}, section "__DATA,__llvm_prf_data", align 8 define void @baz() { - call void @llvm.instrprof.increment(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @baz_prof_name, i32 0, i32 0), i64 0, i32 3, i32 0) - call void @llvm.instrprof.increment(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @baz_prof_name, i32 0, i32 0), i64 0, i32 3, i32 1) - call void @llvm.instrprof.increment(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @baz_prof_name, i32 0, i32 0), i64 0, i32 3, i32 2) + call void @llvm.instrprof.increment(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @__llvm_profile_name_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]* @__llvm_profile_name_baz, i32 0, i32 0), i64 0, i32 3, i32 1) + call void @llvm.instrprof.increment(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @__llvm_profile_name_baz, i32 0, i32 0), i64 0, i32 3, i32 2) ret void } |

