[all-commits] [llvm/llvm-project] 603d58: [InstrProfiling] Use !associated metadata for coun...
Petr Hosek via All-commits
all-commits at lists.llvm.org
Mon Jun 8 15:08:49 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 603d58b5e49c76e4a2e5bf1450b71b100a3396ba
https://github.com/llvm/llvm-project/commit/603d58b5e49c76e4a2e5bf1450b71b100a3396ba
Author: Petr Hosek <phosek at google.com>
Date: 2020-06-08 (Mon, 08 Jun 2020)
Changed paths:
M compiler-rt/lib/profile/InstrProfilingPlatformLinux.c
A compiler-rt/test/profile/instrprof-gc-sections.c
M llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
A llvm/test/Instrumentation/InstrProfiling/associated.ll
A llvm/test/Transforms/PGOProfile/associated.ll
M llvm/test/Transforms/PGOProfile/counter_promo.ll
M llvm/test/Transforms/PGOProfile/counter_promo_mexits.ll
Log Message:
-----------
[InstrProfiling] Use !associated metadata for counters, data and values
The !associated metadata may be attached to a global object declaration
with a single argument that references another global object. This
metadata prevents discarding of the global object in linker GC unless
the referenced object is also discarded.
Furthermore, when a function symbol is discarded by the linker, setting
up !associated metadata allows linker to discard counters, data and
values associated with that function symbol. This is not possible today
because there's metadata to guide the linker. This approach is also used
by other instrumentations like sanitizers.
Note that !associated metadata is only supported by ELF, it does not have
any effect on non-ELF targets.
Differential Revision: https://reviews.llvm.org/D76802
More information about the All-commits
mailing list