llvm-project/llvm/test/Instrumentation/InstrProfiling
Hans Wennborg f50aef745c Revert "[InstrProfiling] Don't generate __llvm_profile_runtime_user"
This broke the check-profile tests on Mac, see comment on the code
review.

> This is no longer needed, we can add __llvm_profile_runtime directly
> to llvm.compiler.used or llvm.used to achieve the same effect.
>
> Differential Revision: https://reviews.llvm.org/D98325

This reverts commit c7712087cb.

Also reverting the dependent follow-up commit:

Revert "[InstrProfiling] Generate runtime hook for ELF platforms"

> When using -fprofile-list to selectively apply instrumentation only
> to certain files or functions, we may end up with a binary that doesn't
> have any counters in the case where no files were selected. However,
> because on Linux and Fuchsia, we pass -u__llvm_profile_runtime, the
> runtime would still be pulled in and incur some non-trivial overhead,
> especially in the case when the continuous or runtime counter relocation
> mode is being used. A better way would be to pull in the profile runtime
> only when needed by declaring the __llvm_profile_runtime symbol in the
> translation unit only when needed.
>
> This approach was already used prior to 9a041a7522, but we changed it
> to always generate the __llvm_profile_runtime due to a TAPI limitation.
> Since TAPI is only used on Mach-O platforms, we could use the early
> emission of __llvm_profile_runtime there, and on other platforms we
> could change back to the earlier approach where the symbol is generated
> later only when needed. We can stop passing -u__llvm_profile_runtime to
> the linker on Linux and Fuchsia since the generated undefined symbol in
> each translation unit that needed it serves the same purpose.
>
> Differential Revision: https://reviews.llvm.org/D98061

This reverts commit 87fd09b25f.
2021-03-12 13:53:46 +01:00
..
X86 Revert "[InstrProfiling] Use nobits as __llvm_prf_cnts section type in ELF" 2021-02-24 00:41:43 -08:00
PR23499.ll [PGO] Use multiple comdat groups for COFF 2020-08-03 21:33:16 -07:00
always_inline.ll [test][InstrProf] Fix always_inline.ll under NPM 2020-09-18 14:50:47 -07:00
atomic-updates.ll
comdat.ll [PGO] Use multiple comdat groups for COFF 2020-08-03 21:33:16 -07:00
early-exit.ll
icall.ll [InstrProfiling] Place __llvm_prf_vnodes and __llvm_prf_names in llvm.used on ELF 2021-03-03 11:32:24 -08:00
linkage.ll Revert "[InstrProfiling] Don't generate __llvm_profile_runtime_user" 2021-03-12 13:53:46 +01:00
no-counters.ll
noruntime.ll
platform.ll [InstrProfiling] Use ELF section groups for counters, data and values 2021-02-22 14:00:02 -08:00
profiling.ll Revert "[InstrProfiling] Don't generate __llvm_profile_runtime_user" 2021-03-12 13:53:46 +01:00
runtime-counter-relocation.ll