__llvm_prf_vnodes and __llvm_prf_names are used by runtime but not
referenced via relocation in the translation unit.
With -z start-stop-gc (LLD 13 (D96914); GNU ld 2.37 https://sourceware.org/bugzilla/show_bug.cgi?id=27451),
the linker does not let __start_/__stop_ references retain their sections.
Place __llvm_prf_vnodes and __llvm_prf_names in llvm.used to make
them retained by the linker.
This patch changes most existing UsedVars cases to CompilerUsedVars
to reflect the ideal state - if the binary format properly supports
section based GC (dead stripping), llvm.compiler.used should be sufficient.
__llvm_prf_vnodes and __llvm_prf_names are switched to UsedVars
since we want them to be unconditionally retained by both compiler and linker.
Behaviors on COFF/Mach-O are not affected.
Is it better to split the test into multiple RUN file based tests with only one requires linux and lld? Otherwise it seems that adding this will disable the tests on some bots (freebsd or no lld).