[clang] [llvm] [llvm][AsmPrinter] Add direct calls to callgraph section (PR #155706)
Prabhu Rajasekaran via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 15 17:09:54 PDT 2025
================
@@ -1866,20 +1875,39 @@ static StringRef getMIMnemonic(const MachineInstr &MI, MCStreamer &Streamer) {
return Name;
}
-void AsmPrinter::emitIndirectCalleeLabels(
+void AsmPrinter::emitCallsiteLabelsForCallgraph(
FunctionInfo &FuncInfo,
const MachineFunction::CallSiteInfoMap &CallSitesInfoMap,
const MachineInstr &MI) {
- // Only indirect calls have type identifiers set.
- const auto &CallSiteInfo = CallSitesInfoMap.find(&MI);
- if (CallSiteInfo == CallSitesInfoMap.end())
- return;
-
- for (ConstantInt *CalleeTypeId : CallSiteInfo->second.CalleeTypeIds) {
+ assert(MI.isCall() && "Callsite labels are meant for call instruction only.");
----------------
Prabhuk wrote:
DONE. PTAL.
https://github.com/llvm/llvm-project/pull/155706
More information about the llvm-commits
mailing list