[PATCH] D25456: [InstrProf] Add support for dead_strip+live_support functionality

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 3 09:57:43 PDT 2021


MaskRay added a comment.

In D25456#2794689 <https://reviews.llvm.org/D25456#2794689>, @vsk wrote:

> If llvm stopped appending __profd_foo to llvm.compiler.used, there might not be anything left to prevent the optimizer from discarding it. The current scheme of having the linker ignore N_NO_DEAD_STRIP if S_ATTR_LIVE_SUPPORT is in effect seems like a neat way to solve the issue. Is there a tidy alternative?

Currently `__profd_foo` is in llvm.used instead of llvm.compiler.used on Mach-O.

D103372 <https://reviews.llvm.org/D103372> My thought (but I don't have a device to test) is that Mach-O can use `appendToCompilerUsed(*M, CompilerUsedVars);` as well.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D25456



More information about the llvm-commits mailing list