]> granicus.if.org Git - clang/commit
InstrProf: Make profile variables private to reduce binary size overhead
authorJustin Bogner <mail@justinbogner.com>
Fri, 20 Mar 2015 06:34:38 +0000 (06:34 +0000)
committerJustin Bogner <mail@justinbogner.com>
Fri, 20 Mar 2015 06:34:38 +0000 (06:34 +0000)
commitc1dec21eaaed82a7ab5382810dcc889d60d4486e
tree83156da6a58552fcc58e4507501ad90dfe483fa9
parent1842e3305cbd7b7499eb8b41ac44d4bdeb5839c1
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@232799 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CodeGenPGO.cpp
test/Profile/c-captured.c
test/Profile/c-general.c
test/Profile/c-linkage.c
test/Profile/c-unreachable-after-switch.c
test/Profile/cxx-lambda.cpp
test/Profile/cxx-linkage.cpp
test/Profile/cxx-throws.cpp
test/Profile/objc-general.m