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

Matt Morehouse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 19 14:22:25 PDT 2021


morehouse added inline comments.


================
Comment at: llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:1274
+    assert(FuncCGSection && "null call graph section");
+    OutStreamer->PushSection();
+    OutStreamer->SwitchSection(FuncCGSection);
----------------
Pushing the section without popping it later seems wrong.

If we don't need push/pop, let's not use it.  Otherwise, let's put it outside the loop.


================
Comment at: llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:1302
+    } else {
+      // TODO: move this logic to MachineFunction, and share.
+      const auto *TypeId = extractNumericCGTypeId(*Func);
----------------
I don't think we need to share it anymore, since the only use is here.


================
Comment at: llvm/test/CodeGen/call-graph-section.ll:5
+; RUN: llvm-readelf -x .callgraph - | FileCheck %s
+; XFAIL: *
+
----------------
MaskRay wrote:
> Why is this XFAIL?
Yes, we should figure this out before landing.  Probably we need to fix an assumption in the `llc` parser that no longer holds due to the new operand bundle type.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105916



More information about the llvm-commits mailing list