Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init |
|
#
60c4f82d |
| 08-Jan-2024 |
Petr Hosek <phosek@google.com> |
[InstrProfiling] No runtime registration for ELF, COFF, Mach-O and XCOFF (#77225)
Whether runtime registration is needed is not dependent on the OS but
the file format. For ELF, COFF, Mach-O or XCO
[InstrProfiling] No runtime registration for ELF, COFF, Mach-O and XCOFF (#77225)
Whether runtime registration is needed is not dependent on the OS but
the file format. For ELF, COFF, Mach-O or XCOFF, we can always use the
linker support. This is important for baremetal platforms such as RTOS
and UEFI platforms where there is no OS but we still don't want to use
runtime registration and rely on linker support instead.
show more ...
|
#
66b919cb |
| 08-Dec-2023 |
Arthur Eubanks <aeubanks@google.com> |
Reland [InstrProf][X86] Mark non-directly accessed globals as large (#74778)
We'd like to make various instrprof globals large to make them not contribute to relocation pressure since there are no d
Reland [InstrProf][X86] Mark non-directly accessed globals as large (#74778)
We'd like to make various instrprof globals large to make them not contribute to relocation pressure since there are no direct accesses to them in the module.
Similar to what was done for asan_globals in #74514.
This affects the __llvm_prf_vals, __llvm_prf_vnds, and __llvm_prf_names sections.
The reland fixes platform.ll.
show more ...
|
Revision tags: llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init |
|
#
9ff36df5 |
| 16-Jul-2022 |
Fangrui Song <i@maskray.me> |
[PGO][InstrProf][test] Convert to opaque pointers and fix some stale tests
|
#
acead46a |
| 16-Jul-2022 |
Fangrui Song <i@maskray.me> |
[test] Migrate legacy InstrProfiling tests to new PM
|
Revision tags: llvmorg-14.0.6, llvmorg-14.0.5 |
|
#
3dbb5cb2 |
| 09-Jun-2022 |
Paul Robinson <paul.robinson@sony.com> |
[PS5] Use linker scripting to find profiling data, like PS4
|
Revision tags: llvmorg-14.0.4 |
|
#
2407c13a |
| 03-May-2022 |
Wael Yehia <wyehia@ca.ibm.com> |
[AIX][PGO] Enable linux style PGO on AIX
This patch switches the PGO implementation on AIX from using the runtime registration-based section tracking to the __start_SECNAME/__stop_SECNAME based. In
[AIX][PGO] Enable linux style PGO on AIX
This patch switches the PGO implementation on AIX from using the runtime registration-based section tracking to the __start_SECNAME/__stop_SECNAME based. In order to enable the recognition of __start_SECNAME/__stop_SECNAME symbols in the AIX linker, the -bdbg:namedsects:ss needs to be used.
Reviewed By: jsji, MaskRay, davidxl
Differential Revision: https://reviews.llvm.org/D124857
show more ...
|
Revision tags: llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1, llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2 |
|
#
628eaa4c |
| 23-Aug-2021 |
Jinsong Ji <jji@us.ibm.com> |
[InstrProfiling] Add AIX triple to platform test
We found that AIX was not covered in most of the InstrProfiling tests. So we are trying to enable the tests gradually.
This is to add AIX triple to
[InstrProfiling] Add AIX triple to platform test
We found that AIX was not covered in most of the InstrProfiling tests. So we are trying to enable the tests gradually.
This is to add AIX triple to platform tests to make sure the registrations are OK.
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D108490
show more ...
|
#
77b435aa |
| 19-Aug-2021 |
Fangrui Song <i@maskray.me> |
Revert "[InstrProfiling] Make COFF use the ELF comdat scheme (drop link.exe compatibility)"
This reverts commit fbb8e772ec501a1b71643db90e9c6445e17d7cac.
Accidentally pushed.
|
#
fbb8e772 |
| 19-Aug-2021 |
Fangrui Song <i@maskray.me> |
[InstrProfiling] Make COFF use the ELF comdat scheme (drop link.exe compatibility)
The COFF specific `DataReferencedByCode` complexity (D103372 D103717) is due to a link.exe limitation: an external
[InstrProfiling] Make COFF use the ELF comdat scheme (drop link.exe compatibility)
The COFF specific `DataReferencedByCode` complexity (D103372 D103717) is due to a link.exe limitation: an external symbol in IMAGE_COMDAT_SELECT_ASSOCIATIVE is not really dropped, so it can cause duplicate definition error.
show more ...
|
Revision tags: llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2 |
|
#
9e51d1f3 |
| 04-Jun-2021 |
Fangrui Song <i@maskray.me> |
[InstrProfiling] If no value profiling, make data variable private and (for Windows) use one comdat
`__profd_*` variables are referenced by code only when value profiling is enabled. If disabled (e.
[InstrProfiling] If no value profiling, make data variable private and (for Windows) use one comdat
`__profd_*` variables are referenced by code only when value profiling is enabled. If disabled (e.g. default -fprofile-instr-generate), the symbols just waste space on ELF/Mach-O. We change the comdat symbol from `__profd_*` to `__profc_*` because an internal symbol does not provide deduplication features on COFF. The choice doesn't matter on ELF.
(In -DLLVM_BUILD_INSTRUMENTED_COVERAGE=on build, there is now no `__profd_*` symbols.)
On Windows this enables further optimization. We are no longer affected by the link.exe limitation: an external symbol in IMAGE_COMDAT_SELECT_ASSOCIATIVE can cause duplicate definition error. https://lists.llvm.org/pipermail/llvm-dev/2021-May/150758.html We can thus use llvm.compiler.used instead of llvm.used like ELF (D97585). This avoids many `/INCLUDE:` directives in `.drectve`.
Here is rnk's measurement for Chrome: ``` This reduced object file size of base_unittests.exe, compiled with coverage, optimizations, and gmlt debug info by 10%:
#BEFORE
$ find . -iname '*.obj' | xargs du -b | awk '{ sum += $1 } END { print sum}' 1047758867
$ du -cksh base_unittests.exe 82M base_unittests.exe 82M total
# AFTER
$ find . -iname '*.obj' | xargs du -b | awk '{ sum += $1 } END { print sum}' 937886499
$ du -cksh base_unittests.exe 78M base_unittests.exe 78M total ```
The change is NFC for Mach-O.
Reviewed By: davidxl, rnk
Differential Revision: https://reviews.llvm.org/D103372
show more ...
|
#
e9a9c850 |
| 04-Jun-2021 |
Nico Weber <thakis@chromium.org> |
Revert "[InstrProfiling] If no value profiling, make data variable private and (for Windows) use one comdat"
This reverts commit a14fc749aab2c8e1a45d19d512255ebfc69357c3. Breaks check-profile on mac
Revert "[InstrProfiling] If no value profiling, make data variable private and (for Windows) use one comdat"
This reverts commit a14fc749aab2c8e1a45d19d512255ebfc69357c3. Breaks check-profile on macOS. See https://reviews.llvm.org/D103372 for details.
show more ...
|
#
a14fc749 |
| 03-Jun-2021 |
Fangrui Song <i@maskray.me> |
[InstrProfiling] If no value profiling, make data variable private and (for Windows) use one comdat
`__profd_*` variables are referenced by code only when value profiling is enabled. If disabled (e.
[InstrProfiling] If no value profiling, make data variable private and (for Windows) use one comdat
`__profd_*` variables are referenced by code only when value profiling is enabled. If disabled (e.g. default -fprofile-instr-generate), the symbols just waste space on ELF/Mach-O. We change the comdat symbol from `__profd_*` to `__profc_*` because an internal symbol does not provide deduplication features on COFF. The choice doesn't matter on ELF.
(In -DLLVM_BUILD_INSTRUMENTED_COVERAGE=on build, there is now no `__profd_*` symbols.)
On Windows this enables further optimization. We are no longer affected by the link.exe limitation: an external symbol in IMAGE_COMDAT_SELECT_ASSOCIATIVE can cause duplicate definition error. https://lists.llvm.org/pipermail/llvm-dev/2021-May/150758.html We can thus use llvm.compiler.used instead of llvm.used like ELF (D97585). This avoids many `/INCLUDE:` directives in `.drectve`.
Here is rnk's measurement for Chrome: ``` This reduced object file size of base_unittests.exe, compiled with coverage, optimizations, and gmlt debug info by 10%:
#BEFORE
$ find . -iname '*.obj' | xargs du -b | awk '{ sum += $1 } END { print sum}' 1047758867
$ du -cksh base_unittests.exe 82M base_unittests.exe 82M total
# AFTER
$ find . -iname '*.obj' | xargs du -b | awk '{ sum += $1 } END { print sum}' 937886499
$ du -cksh base_unittests.exe 78M base_unittests.exe 78M total ```
Reviewed By: davidxl, rnk
Differential Revision: https://reviews.llvm.org/D103372
show more ...
|
#
87c43f3a |
| 02-Jun-2021 |
Fangrui Song <i@maskray.me> |
[InstrProfiling] Delete linkage/visibility toggling for Windows
The linkage/visibility of `__profn_*` variables are derived from the profiled functions.
extern_weak => linkonce available_ex
[InstrProfiling] Delete linkage/visibility toggling for Windows
The linkage/visibility of `__profn_*` variables are derived from the profiled functions.
extern_weak => linkonce available_externally => linkonce_odr internal => private extern => private _ => unchanged
The linkage/visibility of `__profc_*`/`__profd_*` variables are derived from `__profn_*` with linkage/visibility wrestling for Windows.
The changes can be folded to the following without changing semantics.
``` if (TT.isOSBinFormatCOFF() && !NeedComdat) { Linkage = GlobalValue::InternalLinkage; Visibility = GlobalValue::DefaultVisibility; } ```
That said, I think we can just delete the code block.
An extern/internal function will now use private `__profc_*`/`__profd_*` variables, instead of internal ones. This saves some symbol table entries.
A non-comdat {linkonce,weak}_odr function will now use hidden external `__profc_*`/`__profd_*` variables instead of internal ones. There is potential object file size increase because such symbols need `/INCLUDE:` directives. However such non-comdat functions are rare (note that non-comdat weak definitions don't prevent duplicate definition error).
The behavior changes match ELF.
Reviewed By: rnk
Differential Revision: https://reviews.llvm.org/D103355
show more ...
|
#
7145c6ca |
| 29-May-2021 |
Fangrui Song <i@maskray.me> |
[InstrProfiling][test] Improve tests
|
#
9f506fc7 |
| 29-May-2021 |
Fangrui Song <i@maskray.me> |
[InstrProfiling][test] Fix stale tests
* Change linkage/visibility of __profn_ variables to match the reality * alwaysinline.ll: Add "EnableValueProfiling", otherwise it doesn't test available_exter
[InstrProfiling][test] Fix stale tests
* Change linkage/visibility of __profn_ variables to match the reality * alwaysinline.ll: Add "EnableValueProfiling", otherwise it doesn't test available_externally alwaysinline. * Delete PR23499.ll - covered by other comdat tests.
show more ...
|
Revision tags: llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1, llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3, llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1, llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2, llvmorg-10.0.1-rc1, llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3, llvmorg-10.0.0-rc2, llvmorg-10.0.0-rc1, llvmorg-11-init, llvmorg-9.0.1, llvmorg-9.0.1-rc3, llvmorg-9.0.1-rc2, llvmorg-9.0.1-rc1, llvmorg-9.0.0, llvmorg-9.0.0-rc6, llvmorg-9.0.0-rc5, llvmorg-9.0.0-rc4, llvmorg-9.0.0-rc3, llvmorg-9.0.0-rc2, llvmorg-9.0.0-rc1, llvmorg-10-init |
|
#
c24b7a16 |
| 13-Jul-2019 |
Petr Hosek <phosek@google.com> |
[InstrProfiling] Use ELF section groups for counters, data and values
__start_/__stop_ references retain C identifier name sections such as __llvm_prf_*. Putting these into a section group disables
[InstrProfiling] Use ELF section groups for counters, data and values
__start_/__stop_ references retain C identifier name sections such as __llvm_prf_*. Putting these into a section group disables this logic.
The ELF section group semantics ensures that group members are retained or discarded as a unit. When a function symbol is discarded, this allows allows linker to discard counters, data and values associated with that function symbol as well.
Note that `noduplicates` COMDAT is lowered to zero-flag section group in ELF. We only set this for functions that aren't already in a COMDAT and for those that don't have available_externally linkage since we already use regular COMDAT groups for those.
Differential Revision: https://reviews.llvm.org/D96757
show more ...
|
#
4827492d |
| 22-Feb-2021 |
Petr Hosek <phosek@google.com> |
Revert "[InstrProfiling] Use ELF section groups for counters, data and values"
This reverts commits: 5ca21175e09fc7fb7dcaee9ebd6782d122a5688f 97184ab99c46e35ae94f828ee90f5d6af2c47e11
The instrprof-
Revert "[InstrProfiling] Use ELF section groups for counters, data and values"
This reverts commits: 5ca21175e09fc7fb7dcaee9ebd6782d122a5688f 97184ab99c46e35ae94f828ee90f5d6af2c47e11
The instrprof-gc-sections.c is failing on AArch64 LLD bot.
show more ...
|
#
5ca21175 |
| 13-Jul-2019 |
Petr Hosek <phosek@google.com> |
[InstrProfiling] Use ELF section groups for counters, data and values
__start_/__stop_ references retain C identifier name sections such as __llvm_prf_*. Putting these into a section group disables
[InstrProfiling] Use ELF section groups for counters, data and values
__start_/__stop_ references retain C identifier name sections such as __llvm_prf_*. Putting these into a section group disables this logic.
The ELF section group semantics ensures that group members are retained or discarded as a unit. When a function symbol is discarded, this allows allows linker to discard counters, data and values associated with that function symbol as well.
Note that `noduplicates` COMDAT is lowered to zero-flag section group in ELF. We only set this for functions that aren't already in a COMDAT and for those that don't have available_externally linkage since we already use regular COMDAT groups for those.
Differential Revision: https://reviews.llvm.org/D96757
show more ...
|
Revision tags: llvmorg-8.0.1, llvmorg-8.0.1-rc4, llvmorg-8.0.1-rc3 |
|
#
6fde832b |
| 20-Jun-2019 |
Rainer Orth <ro@gcc.gnu.org> |
[profile] Solaris ld supports __start___llvm_prof_data etc. labels
Currently, many profiling tests on Solaris FAIL like
Command Output (stderr): -- Undefined first refer
[profile] Solaris ld supports __start___llvm_prof_data etc. labels
Currently, many profiling tests on Solaris FAIL like
Command Output (stderr): -- Undefined first referenced symbol in file __llvm_profile_register_names_function /tmp/lit_tmp_Nqu4eh/infinite_loop-9dc638.o __llvm_profile_register_function /tmp/lit_tmp_Nqu4eh/infinite_loop-9dc638.o
Solaris 11.4 ld supports the non-standard GNU ld extension of adding __start_SECNAME and __stop_SECNAME labels to sections whose names are valid as C identifiers. Given that we already use Solaris 11.4-only features like ld -z gnu-version-script-compat and fully working .preinit_array support in compiler-rt, we don't need to worry about older versions of Solaris ld.
The patch documents that support (although the comment in lib/Transforms/Instrumentation/InstrProfiling.cpp (needsRuntimeRegistrationOfSectionRange) is quite cryptic what it's actually about), and adapts the affected testcase not to expect the alternativeq __llvm_profile_register_functions and __llvm_profile_init. It fixes all affected tests.
Tested on amd64-pc-solaris2.11.
Differential Revision: https://reviews.llvm.org/D41111
llvm-svn: 363984
show more ...
|
Revision tags: llvmorg-8.0.1-rc2, llvmorg-8.0.1-rc1, llvmorg-8.0.0, llvmorg-8.0.0-rc5, llvmorg-8.0.0-rc4, llvmorg-8.0.0-rc3, llvmorg-7.1.0, llvmorg-7.1.0-rc1 |
|
#
987d331f |
| 08-Feb-2019 |
Reid Kleckner <rnk@google.com> |
[InstrProf] Implement static profdata registration
Summary: The motivating use case is eliminating duplicate profile data registered for the same inline function in two object files. Before this cha
[InstrProf] Implement static profdata registration
Summary: The motivating use case is eliminating duplicate profile data registered for the same inline function in two object files. Before this change, users would observe multiple symbol definition errors with VC link, but links with LLD would succeed.
Users (Mozilla) have reported that PGO works well with clang-cl and LLD, but when using LLD without this static registration, we would get into a "relocation against a discarded section" situation. I'm not sure what happens in that situation, but I suspect that duplicate, unused profile information was retained. If so, this change will reduce the size of such binaries with LLD.
Now, Windows uses static registration and is in line with all the other platforms.
Reviewers: davidxl, wmi, inglorion, void, calixte
Subscribers: mgorny, krytarowski, eraman, fedor.sergeev, hiraditya, #sanitizers, dmajor, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D57929
llvm-svn: 353547
show more ...
|
Revision tags: llvmorg-8.0.0-rc2, llvmorg-8.0.0-rc1, llvmorg-7.0.1, llvmorg-7.0.1-rc3, llvmorg-7.0.1-rc2, llvmorg-7.0.1-rc1, llvmorg-7.0.0, llvmorg-7.0.0-rc3, llvmorg-7.0.0-rc2, llvmorg-7.0.0-rc1 |
|
#
ba82788f |
| 27-Jul-2018 |
Reid Kleckner <rnk@google.com> |
[InstrProf] Don't register __llvm_profile_runtime_user
Refactor some FileCheck prefixes while I'm at it.
Fixes PR38340
llvm-svn: 338172
|
Revision tags: llvmorg-6.0.1, llvmorg-6.0.1-rc3, llvmorg-6.0.1-rc2, llvmorg-6.0.1-rc1, llvmorg-5.0.2, llvmorg-5.0.2-rc2, llvmorg-5.0.2-rc1, llvmorg-6.0.0, llvmorg-6.0.0-rc3, llvmorg-6.0.0-rc2, llvmorg-6.0.0-rc1, llvmorg-5.0.1, llvmorg-5.0.1-rc3, llvmorg-5.0.1-rc2, llvmorg-5.0.1-rc1, llvmorg-5.0.0, llvmorg-5.0.0-rc5, llvmorg-5.0.0-rc4, llvmorg-5.0.0-rc3, llvmorg-5.0.0-rc2, llvmorg-5.0.0-rc1, llvmorg-4.0.1, llvmorg-4.0.1-rc3, llvmorg-4.0.1-rc2, llvmorg-4.0.1-rc1, llvmorg-4.0.0, llvmorg-4.0.0-rc4, llvmorg-4.0.0-rc3 |
|
#
55891fc7 |
| 14-Feb-2017 |
Vedant Kumar <vsk@apple.com> |
Re-apply "[profiling] Remove dead profile name vars after emitting name data"
This reverts 295092 (re-applies 295084), with a fix for dangling references from the array of coverage names passed down
Re-apply "[profiling] Remove dead profile name vars after emitting name data"
This reverts 295092 (re-applies 295084), with a fix for dangling references from the array of coverage names passed down from frontends.
I missed this in my initial testing because I only checked test/Profile, and not test/CoverageMapping as well.
Original commit message:
The profile name variables passed to counter increment intrinsics are dead after we emit the finalized name data in __llvm_prf_nm. However, we neglect to erase these name variables. This causes huge size increases in the __TEXT,__const section as well as slowdowns when linker dead stripping is disabled. Some affected projects are so massive that they fail to link on Darwin, because only the small code model is supported.
Fix the issue by throwing away the name constants as soon as we're done with them.
Differential Revision: https://reviews.llvm.org/D29921
llvm-svn: 295099
show more ...
|
#
27ebdf4b |
| 14-Feb-2017 |
Vedant Kumar <vsk@apple.com> |
Revert "[profiling] Remove dead profile name vars after emitting name data"
This reverts commit r295084. There is a test failure on:
http://lab.llvm.org:8011/builders/clang-atom-d525-fedora-rel/bui
Revert "[profiling] Remove dead profile name vars after emitting name data"
This reverts commit r295084. There is a test failure on:
http://lab.llvm.org:8011/builders/clang-atom-d525-fedora-rel/builds/2620/
llvm-svn: 295092
show more ...
|
#
bb104846 |
| 14-Feb-2017 |
Vedant Kumar <vsk@apple.com> |
[profiling] Remove dead profile name vars after emitting name data
The profile name variables passed to counter increment intrinsics are dead after we emit the finalized name data in __llvm_prf_nm.
[profiling] Remove dead profile name vars after emitting name data
The profile name variables passed to counter increment intrinsics are dead after we emit the finalized name data in __llvm_prf_nm. However, we neglect to erase these name variables. This causes huge size increases in the __TEXT,__const section as well as slowdowns when linker dead stripping is disabled. Some affected projects are so massive that they fail to link on Darwin, because only the small code model is supported.
Fix the issue by throwing away the name constants as soon as we're done with them.
Differential Revision: https://reviews.llvm.org/D29921
llvm-svn: 295084
show more ...
|
Revision tags: llvmorg-4.0.0-rc2, llvmorg-4.0.0-rc1, llvmorg-3.9.1, llvmorg-3.9.1-rc3, llvmorg-3.9.1-rc2, llvmorg-3.9.1-rc1 |
|
#
de2ae967 |
| 11-Oct-2016 |
Vedant Kumar <vsk@apple.com> |
[InstrProf] Add support for dead_strip+live_support functionality
On Darwin, marking a section as "regular,live_support" means that a symbol in the section should only be kept live if it has a refer
[InstrProf] Add support for dead_strip+live_support functionality
On Darwin, marking a section as "regular,live_support" means that a symbol in the section should only be kept live if it has a reference to something that is live. Otherwise, the linker is free to dead-strip it.
Turn this functionality on for the __llvm_prf_data section.
This means that counters and data associated with dead functions will be removed from dead-stripped binaries. This will result in smaller profiles and binaries, and should speed up profile collection.
Tested with check-profile, llvm-lit test/tools/llvm-{cov,profdata}, and check-llvm.
Differential Revision: https://reviews.llvm.org/D25456
llvm-svn: 283947
show more ...
|