[PATCH] D105907: [CallGraphSection] Add call graph section options and documentation
Necip Fazil Yildiran via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 13 10:06:17 PDT 2021
necipfazil created this revision.
necipfazil added reviewers: rsmith, morehouse, kcc, cfe-commits, llvm-commits.
Herald added subscribers: ormris, dexonsmith, dang, hiraditya.
necipfazil requested review of this revision.
Herald added projects: clang, LLVM.
This is the first of the patch series that adds the support for
computing, storing, and restoring call graphs with LLVM. This adds the
options and the design documentation for computing and storing the call
graphs.
Inferring indirect call targets from a binary is challenging without
source-level information. Hence, the reconstruction of a fine-grained
call graph from the binary is unfeasible for indirect/virtual calls.
To address this, designed solution is to collect the necessary information
to construct the call graph while the source information is present, and
store it in a non-code section of the binary. To enable, use
-fcall-graph-section for Clang, or --call-graph-section for LLVM.
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/D105907
Files:
clang/docs/CallGraphSection.rst
clang/include/clang/Basic/CodeGenOptions.def
clang/include/clang/Driver/Options.td
clang/lib/CodeGen/BackendUtil.cpp
clang/lib/Driver/ToolChains/Clang.cpp
llvm/include/llvm/CodeGen/CommandFlags.h
llvm/include/llvm/Target/TargetOptions.h
llvm/lib/CodeGen/CommandFlags.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105907.358319.patch
Type: text/x-patch
Size: 13385 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210713/97ceb0f4/attachment.bin>
More information about the llvm-commits
mailing list