[PATCH] D103372: [InstrProfiling] If no value profiling, make data variable private and (for Windows) use one comdat
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 1 10:09:12 PDT 2021
MaskRay marked an inline comment as done.
MaskRay added inline comments.
================
Comment at: llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp:857
+ auto GroupName = TT.isOSBinFormatCOFF() && ValueProfiling ? GV->getName()
+ : CntsVarName;
Comdat *C = M->getOrInsertComdat(GroupName);
----------------
davidxl wrote:
> why changing behavior on ELF?
COFF now uses `__profc_*` as the comdat symbol. `__profd_*` is always internal for non-value-profiling cases. So the group name must be `__profc_*`.
For ELF for implementation simplicity we use the same `__profc_*`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103372/new/
https://reviews.llvm.org/D103372
More information about the llvm-commits
mailing list