[PATCH] D57929: [InstrProf] Implement static profdata registration
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 7 15:17:04 PST 2019
rnk created this revision.
rnk added reviewers: davidxl, wmi, inglorion, void, calixte.
Herald added subscribers: Sanitizers, hiraditya, fedor.sergeev, eraman, krytarowski, mgorny.
Herald added projects: Sanitizers, LLVM.
The motivating use case is eliminating duplicate profile data registered
for the same inline function in two object files. Before this change,
users would observe multiple symbol definition errors with VC link, but
links with LLD would succeed.
Users (Mozilla) have reported that PGO works well with clang-cl and LLD,
but when using LLD without this static registration, we would get into a
"relocation against a discarded section" situation. I'm not sure what
happens in that situation, but I suspect that duplicate, unused profile
information was retained. If so, this change will reduce the size of
such binaries with LLD.
Now, Windows uses static registration and is in line with all the other
platforms.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D57929
Files:
compiler-rt/cmake/base-config-ix.cmake
compiler-rt/lib/profile/CMakeLists.txt
compiler-rt/lib/profile/InstrProfilingPlatformOther.c
compiler-rt/lib/profile/InstrProfilingPlatformWindows.c
compiler-rt/test/profile/coverage-inline.cpp
compiler-rt/test/profile/lit.cfg
llvm/include/llvm/ProfileData/InstrProfData.inc
llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
llvm/test/Instrumentation/InstrProfiling/PR23499.ll
llvm/test/Instrumentation/InstrProfiling/comdat.ll
llvm/test/Instrumentation/InstrProfiling/linkage.ll
llvm/test/Instrumentation/InstrProfiling/platform.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57929.185876.patch
Type: text/x-patch
Size: 27005 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190207/027ee916/attachment.bin>
More information about the llvm-commits
mailing list