diff options
| author | Xinliang David Li <davidxl@google.com> | 2016-02-27 23:11:30 +0000 |
|---|---|---|
| committer | Xinliang David Li <davidxl@google.com> | 2016-02-27 23:11:30 +0000 |
| commit | 985ff20a9caff5091ade54ddc2e21dd8ef016194 (patch) | |
| tree | d3277d277c360b373fd38765244b62dc3915a962 /llvm/test/Instrumentation/InstrProfiling/linkage.ll | |
| parent | 6993abff141af670e8d9413d539ed6fffabf492a (diff) | |
| download | bcm5719-llvm-985ff20a9caff5091ade54ddc2e21dd8ef016194.tar.gz bcm5719-llvm-985ff20a9caff5091ade54ddc2e21dd8ef016194.zip | |
[PGO] Remove redundant counter copies for avail_extern functions.
Differential Revision: http://reviews.llvm.org/D17654
llvm-svn: 262157
Diffstat (limited to 'llvm/test/Instrumentation/InstrProfiling/linkage.ll')
| -rw-r--r-- | llvm/test/Instrumentation/InstrProfiling/linkage.ll | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/test/Instrumentation/InstrProfiling/linkage.ll b/llvm/test/Instrumentation/InstrProfiling/linkage.ll index 110838b1c8c..c1b9fe45f20 100644 --- a/llvm/test/Instrumentation/InstrProfiling/linkage.ll +++ b/llvm/test/Instrumentation/InstrProfiling/linkage.ll @@ -7,6 +7,7 @@ @__profn_foo_weak = weak hidden constant [8 x i8] c"foo_weak" @"__profn_linkage.ll:foo_internal" = internal constant [23 x i8] c"linkage.ll:foo_internal" @__profn_foo_inline = linkonce_odr hidden constant [10 x i8] c"foo_inline" +@__profn_foo_extern = linkonce_odr hidden constant [10 x i8] c"foo_extern" ; COMMON: @__profc_foo = hidden global ; COMMON: @__profd_foo = hidden global @@ -36,6 +37,15 @@ define linkonce_odr void @foo_inline() { ret void } +; LINUX: @__profc_foo_extern = linkonce_odr hidden global {{.*}}section "__llvm_prf_cnts", comdat($__profv_foo_extern), align 8 +; LINUX: @__profd_foo_extern = linkonce_odr hidden global {{.*}}section "__llvm_prf_data", comdat($__profv_foo_extern), align 8 +; OTHER: @__profc_foo_extern = linkonce_odr hidden global +; OTHER: @__profd_foo_extern = linkonce_odr hidden global +define available_externally void @foo_extern() { + call void @llvm.instrprof.increment(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__profn_foo_extern, i32 0, i32 0), i64 0, i32 1, i32 0) + ret void +} + declare void @llvm.instrprof.increment(i8*, i64, i32, i32) ; OTHER: @__llvm_profile_runtime = external global i32 |

