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

Necip Fazil Yildiran via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 17 20:46:49 PDT 2021


necipfazil updated this revision to Diff 359593.
necipfazil added a comment.

Adapt to new call graph section layout, no longer use comdats

- Emit the call graph section following the new call graph section layout.
- No longer use comdats. Instead, use only `SHF_LINK_ORDER` to link call graph sections to function symbols.
- The code is refactored with usage of better data-structures. This increased the readability and the efficiency.

https://reviews.llvm.org/D105909 switches to using operand bundles for propagating indirect callsite type ids. When a C/C++ source is compiled to llvm assembly (.ll) using `clang -fcall-graph-section`, then to object file using `llc --call-graph-section`, an error is raised due to using metadata as operand bundles value. This is further explained in the test case coming with this revision. The test case is marked as expected fail. This issue will be shortly addressed. Though, it is not clear if the issue is due to the call graph section implementation or `llc`.
Otherwise, when a C/C++ source is directly compiled to an object file with `clang -fcall-graph-section`, no issues appear.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105916/new/

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.359593.patch
Type: text/x-patch
Size: 13976 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210718/a3511314/attachment.bin>


More information about the llvm-commits mailing list