[PGO]: Eliminate calls to __llvm_profile_register_function for Linux.
authorXinliang David Li <davidxl@google.com>
Tue, 13 Oct 2015 18:39:48 +0000 (18:39 +0000)
committerXinliang David Li <davidxl@google.com>
Tue, 13 Oct 2015 18:39:48 +0000 (18:39 +0000)
commit198cdecb00077ca4a21154c498341d21acb5ee82
treece089d6f4bd2c010bfe1c3c00f5190e4459d153e
parent7e8a22b5c88c113bfa3da4eabdeec000f28aebb2
[PGO]: Eliminate calls to __llvm_profile_register_function for Linux.

On Linux, the profile runtime can use __start_SECTNAME and __stop_SECTNAME
symbols defined by the linker to locate the start and end location of
a named section (with C name). This eliminates the need for instrumented
binary to call __llvm_profile_register_function during start-up time.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250199 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Instrumentation/InstrProfiling.cpp
test/Instrumentation/InstrProfiling/platform.ll