[all-commits] [llvm/llvm-project] 62d861: [Pseudo Probe] Make .pseudo_probe GC-able
Fangrui Song via All-commits
all-commits at lists.llvm.org
Fri Jun 16 23:46:49 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 62d861422317b3e94a97706f07e8f1abce9a8135
https://github.com/llvm/llvm-project/commit/62d861422317b3e94a97706f07e8f1abce9a8135
Author: Fangrui Song <i at maskray.me>
Date: 2023-06-16 (Fri, 16 Jun 2023)
Changed paths:
M llvm/lib/MC/MCObjectFileInfo.cpp
M llvm/test/Transforms/SampleProfile/pseudo-probe-emit.ll
Log Message:
-----------
[Pseudo Probe] Make .pseudo_probe GC-able
* Add the SHF_LINK_ORDER flag so that the .pseudo_probe section is discarded when the associated text section is discarded.
* Add unique ID so that with `clang -ffunction-sections -fno-unique-section-names`, there is one separate .pseudo_probe for each text section (disambiguated by `.section ....,unique,id` in assembly)
The changes allow .pseudo_probe GC even if we don't place instrumented functions
in an IR comdat (see `getOrCreateFunctionComdat` in SampleProfileProbe.cpp).
Reviewed By: hoy
Differential Revision: https://reviews.llvm.org/D153189
More information about the All-commits
mailing list