[PATCH] D98061: [InstrProfiling] Generate runtime hook for ELF platforms

Petr Hosek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 5 10:50:34 PST 2021


phosek added inline comments.


================
Comment at: llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp:1082-1084
   auto *User = Function::Create(FunctionType::get(Int32Ty, false),
                                 GlobalValue::LinkOnceODRLinkage,
                                 getInstrProfRuntimeHookVarUseFuncName(), M);
----------------
@vsk do you know why we need this function instead of just using `llvm.compiler.used`/`llvm.used` for the symbol? I used that approach for ELF and it seems to be working fine.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98061



More information about the cfe-commits mailing list