diff options
author | Justin Bogner <mail@justinbogner.com> | 2015-03-20 06:34:38 +0000 |
---|---|---|
committer | Justin Bogner <mail@justinbogner.com> | 2015-03-20 06:34:38 +0000 |
commit | e9fe0a298c4c1602b94c2f49ab19a753eaadc87c (patch) | |
tree | 5a1bd0ef7c13bda446c52e21d4164f8bfc627fc1 /clang/test/Profile/c-captured.c | |
parent | 3a8eb896c9d6696402bf113653c4c20b237c7009 (diff) | |
download | bcm5719-llvm-e9fe0a298c4c1602b94c2f49ab19a753eaadc87c.tar.gz bcm5719-llvm-e9fe0a298c4c1602b94c2f49ab19a753eaadc87c.zip |
InstrProf: Make profile variables private to reduce binary size overhead
When we instrument a program for profiling, we copy the linkage of an
instrumented function so that our datastructures merge in the same way
as the function. This avoids redundant copies for things like
linkonce, but ends up emitting names we never need to reference for
normal and internal symbols. Promoting internal and external linkage
to private for these variables reduces the size overhead of profiling
drastically.
llvm-svn: 232799
Diffstat (limited to 'clang/test/Profile/c-captured.c')
-rw-r--r-- | clang/test/Profile/c-captured.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/test/Profile/c-captured.c b/clang/test/Profile/c-captured.c index 8a9e069ec53..6b7ce94b6c9 100644 --- a/clang/test/Profile/c-captured.c +++ b/clang/test/Profile/c-captured.c @@ -3,9 +3,9 @@ // RUN: llvm-profdata merge %S/Inputs/c-captured.proftext -o %t.profdata // RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name c-captured.c %s -o - -emit-llvm -fprofile-instr-use=%t.profdata | FileCheck -check-prefix=PGOUSE -check-prefix=PGOALL %s -// PGOGEN: @[[DCC:__llvm_profile_counters_debug_captured]] = hidden global [3 x i64] zeroinitializer -// PGOGEN: @[[CSC:"__llvm_profile_counters_c-captured.c:__captured_stmt"]] = internal global [2 x i64] zeroinitializer -// PGOGEN: @[[C1C:"__llvm_profile_counters_c-captured.c:__captured_stmt1"]] = internal global [3 x i64] zeroinitializer +// PGOGEN: @[[DCC:__llvm_profile_counters_debug_captured]] = private global [3 x i64] zeroinitializer +// PGOGEN: @[[CSC:"__llvm_profile_counters_c-captured.c:__captured_stmt"]] = private global [2 x i64] zeroinitializer +// PGOGEN: @[[C1C:"__llvm_profile_counters_c-captured.c:__captured_stmt1"]] = private global [3 x i64] zeroinitializer // PGOALL-LABEL: define void @debug_captured() // PGOGEN: store {{.*}} @[[DCC]], i64 0, i64 0 |