aboutsummaryrefslogtreecommitdiff
path: root/libcxx/include/__algorithm/replace.h
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2021-06-18 17:01:17 -0700
committerFangrui Song <i@maskray.me>2021-06-18 17:01:17 -0700
commit3307240f057b856bfb01c1e42e260aa3f896c592 (patch)
treedfbb0483f5dea3d64cc78ecedb89cea70ab9471a /libcxx/include/__algorithm/replace.h
parentb3c1f53c989f6aefad581955e3add222cfb5d890 (diff)
downloadllvm-3307240f057b856bfb01c1e42e260aa3f896c592.zip
llvm-3307240f057b856bfb01c1e42e260aa3f896c592.tar.gz
llvm-3307240f057b856bfb01c1e42e260aa3f896c592.tar.bz2
[InstrProfiling][ELF] Make __profd_ private if the function does not use value profiling
On ELF, the D1003372 optimization can apply to more cases. There are two prerequisites for making `__profd_` private: * `__profc_` keeps `__profd_` live under compiler/linker GC * `__profd_` is not referenced by code The first is satisfied because all counters/data are in a section group (either `comdat any` or `comdat noduplicates`). The second requires that the function does not use value profiling. Regarding the second point: `__profd_` may be referenced by other text sections due to inlining. There will be a linker error if a prevailing text section references the non-prevailing local symbol. With this change, a stage 2 (`-DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_BUILD_INSTRUMENTED=IR`) clang is 4.2% smaller (1-169620032/177066968). `stat -c %s **/*.o | awk '{s+=$1}END{print s}' is 2.5% smaller. Reviewed By: davidxl, rnk Differential Revision: https://reviews.llvm.org/D103717
Diffstat (limited to 'libcxx/include/__algorithm/replace.h')
0 files changed, 0 insertions, 0 deletions