[all-commits] [llvm/llvm-project] c24b7a: [InstrProfiling] Use ELF section groups for counte...
Petr Hosek via All-commits
all-commits at lists.llvm.org
Mon Feb 22 14:00:34 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c24b7a16b1001a8978335183d958fd0aa482c1d9
https://github.com/llvm/llvm-project/commit/c24b7a16b1001a8978335183d958fd0aa482c1d9
Author: Petr Hosek <phosek at google.com>
Date: 2021-02-22 (Mon, 22 Feb 2021)
Changed paths:
M compiler-rt/test/CMakeLists.txt
M compiler-rt/test/profile/CMakeLists.txt
A compiler-rt/test/profile/instrprof-gc-sections.c
M llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
M llvm/test/Instrumentation/InstrProfiling/icall.ll
M llvm/test/Instrumentation/InstrProfiling/linkage.ll
M llvm/test/Instrumentation/InstrProfiling/platform.ll
M llvm/test/Transforms/PGOProfile/counter_promo.ll
M llvm/test/Transforms/PGOProfile/counter_promo_mexits.ll
Log Message:
-----------
[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
More information about the All-commits
mailing list