Many optimizers (e.g. GlobalOpt/ConstantMerge) do not respect linker semantics
for comdat and may not discard the sections as a unit.
The interconnected __llvm_prf_{cnts,data} sections (in comdat for ELF)
are similar to D97432: __profd_ is not directly referenced, so
__profd_ may be discarded while __profc_ is retained, breaking the
interconnection. We currently conservatively add all such sections to
llvm.used and let the linker do GC for ELF.
In D97448, we will change GlobalObject's in the llvm.used list to use SHF_GNU_RETAIN,
causing the metadata sections to be unnecessarily retained (some check-profile tests check for GC).
Use llvm.compiler.used to retain the current GC behavior.