[PATCH] D105916: [AsmPrinter][CallGraphSection] Emit call graph section

Necip Fazil Yildiran via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 13 10:39:01 PDT 2021


necipfazil created this revision.
necipfazil added reviewers: lattner, morehouse, kcc, llvm-commits.
Herald added a subscriber: hiraditya.
necipfazil requested review of this revision.
Herald added a project: LLVM.

Collect the necessary information for constructing the call graph section, and
emit to .callgraph section of the binary.

Numeric type identifiers for indirect calls and targets are computed from type
identifiers passed from clang front-end.

CGSectionFuncComdatCreator pass is used to create comdats for functions whose
symbols will be referenced from the call graph section. A call graph section
is created per function group, and is linked to the relevant function. This
enables dead-stripping of call graph symbols if linked function gets removed.

Original RFC: https://lists.llvm.org/pipermail/llvm-dev/2021-June/151044.html
Updated RFC: https://lists.llvm.org/pipermail/llvm-dev/2021-July/151739.html


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D105916

Files:
  llvm/include/llvm/CodeGen/AsmPrinter.h
  llvm/include/llvm/MC/MCObjectFileInfo.h
  llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  llvm/lib/MC/MCObjectFileInfo.cpp
  llvm/test/CodeGen/call-graph-section.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105916.358342.patch
Type: text/x-patch
Size: 17059 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210713/79ab04cd/attachment.bin>


More information about the llvm-commits mailing list