[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
Loading
Please register or sign in to comment