Commit Graph

6 Commits

Author SHA1 Message Date
Xinliang David Li abfd553c2b [PGO] cleanup: unify prefix for portability macros
llvm-svn: 255748
2015-12-16 03:29:15 +00:00
Xinliang David Li 7c7f120178 [PGO] Unify section name, section symbol definitions (Linux)
Replace hard-coded references to names to key section and section
 symbols with common macro definitions.

llvm-svn: 253897
2015-11-23 18:56:03 +00:00
Xinliang David Li 6fe18f4fba [PGO] Compiler-rt cleanup -- introduces macros for various macros
This makes code more readable and be made more portable in the future.
There is no functional change.

llvm-svn: 253845
2015-11-23 04:38:17 +00:00
Xinliang David Li b6c81d2b92 [PGO] Ensure profile section symbols are created (linux)
- This is to handle a corner case where profile lib is linked
  in but non of the modules are instrumented (On linux, since
  we avoided the overhead to emit runtime hook use functions so
  this is the side effect of that size optimization).
- Added a profile runtime test case to cover all scenarios of
  shared library builds. 

Differential Revision: http://reviews.llvm.org/D14468

llvm-svn: 253098
2015-11-13 22:33:07 +00:00
Xinliang David Li d7134ead18 [PGO] Eliminate prof data register calls on FreeBSD platform
This is a follow up patch of r250199 after verifying the start/stop
section symbols work as spected on FreeBSD.

llvm-svn: 250680
2015-10-19 04:17:19 +00:00
Xinliang David Li f556a7e3c3 [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.

llvm-svn: 250200
2015-10-13 18:40:00 +00:00