[PATCH] D84766: Revert D68041 "[PGO] Don't group COMDAT variables for compiler generated profile variables in ELF"

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 28 09:36:36 PDT 2020


MaskRay created this revision.
MaskRay added reviewers: davidxl, xur, yamauchi.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
MaskRay requested review of this revision.

This reverts commit 367405008755640eac6114b18ec8c98be0cf5392, which only affected ELF
platforms.

The state before this patch was inferior because the section group signature
(comdat name in LLVM IR) `__profv_` consumes one entry in .symtab and a
(potentially long) entry in .strtab . The patch avoided the cost but introduced new
issues:

- One or two additional section headers (64 or 128 bytes on ELF64).
- If the prevailing group does not include `__profvp_` (value profiling not used) but a non-prevailing group from another translation unit has `__profvp_` (the function is inlined into another and triggers value profiling), there will be a stray `__profvp_`.

We are currently investigating a mysterious PGO timeout. When things get
stabalized, we can do D84723 <https://reviews.llvm.org/D84723>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D84766

Files:
  llvm/include/llvm/ProfileData/InstrProf.h
  llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
  llvm/test/Instrumentation/InstrProfiling/PR23499.ll
  llvm/test/Instrumentation/InstrProfiling/comdat.ll
  llvm/test/Instrumentation/InstrProfiling/linkage.ll
  llvm/test/Transforms/PGOProfile/comdat_internal.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84766.281261.patch
Type: text/x-patch
Size: 7695 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200728/63f0e34a/attachment.bin>


More information about the llvm-commits mailing list