[all-commits] [llvm/llvm-project] f50aef: Revert "[InstrProfiling] Don't generate __llvm_pro...
Hans via All-commits
all-commits at lists.llvm.org
Fri Mar 12 04:55:41 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f50aef745c3ba981f3d0bf118b809d0c3880a490
https://github.com/llvm/llvm-project/commit/f50aef745c3ba981f3d0bf118b809d0c3880a490
Author: Hans Wennborg <hans at chromium.org>
Date: 2021-03-12 (Fri, 12 Mar 2021)
Changed paths:
M clang/docs/UsersManual.rst
M clang/lib/Driver/ToolChains/Fuchsia.cpp
M clang/lib/Driver/ToolChains/Fuchsia.h
M clang/lib/Driver/ToolChains/Linux.cpp
M clang/lib/Driver/ToolChains/Linux.h
M clang/test/Driver/coverage-ld.c
M clang/test/Driver/fuchsia.c
M llvm/include/llvm/ProfileData/InstrProf.h
M llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
M llvm/test/Instrumentation/InstrProfiling/linkage.ll
M llvm/test/Instrumentation/InstrProfiling/profiling.ll
Log Message:
-----------
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 c7712087cbb505d324e1149fa224f607c91a8c6a.
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 9a041a75221ca, 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 87fd09b25f8892e07b7ba11525baa9c3ec3e5d3f.
More information about the All-commits
mailing list