[PATCH] D58737: [InstrProf] Use separate comdat group for data and counters
Reid Kleckner via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 27 13:44:33 PST 2019
rnk created this revision.
rnk added reviewers: xur, vsk.
Herald added subscribers: Sanitizers, cfe-commits, hiraditya, eraman.
Herald added projects: clang, Sanitizers, LLVM.
I hadn't realized that instrumentation runs before inlining, so we can't
use the function as the comdat group. Doing so can create relocations
against discarded sections when references to discarded __profc_
variables are inlined into functions outside the function's comdat
group.
In the future, perhaps we should consider standardizing the comdat group
names that ELF and COFF use. It will save object file size, since
__profv_$sym won't appear in the symbol table again.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D58737
Files:
clang/test/Profile/cxx-templates.cpp
compiler-rt/test/profile/coverage-inline.cpp
llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
llvm/test/Instrumentation/InstrProfiling/PR23499.ll
llvm/test/Instrumentation/InstrProfiling/comdat.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58737.188612.patch
Type: text/x-patch
Size: 6811 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190227/f5d0e53d/attachment.bin>
More information about the cfe-commits
mailing list