[PATCH] D76802: [InstrProfiling] Use !associated metadata for counters, data and values

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 1 12:27:44 PST 2021


phosek added a comment.

In D76802#2534118 <https://reviews.llvm.org/D76802#2534118>, @MaskRay wrote:

> "prevents discarding" is not accurate in the context. `__llvm_prf_*` cannot be discarded because C identifier name input sections are GC roots.
>
> Add "C identifier name input sections are GC roots. In LLD, the SHF_LINK_ORDER flag overrides the C identifier name semantics." in appropriate place.

Done, I have revised the change description.

> This C identifier name GC currently only works with LLD but does no harm to gold/GNU ld.
>
> Do you think `__llvm_prf_*` can link to the text section so that the self-link trick is not needed? (https://sourceware.org/bugzilla/show_bug.cgi?id=27259)

I associated the counter with the function symbol which seems to be working and we no longer need the self-link trick.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76802/new/

https://reviews.llvm.org/D76802



More information about the llvm-commits mailing list