[llvm-branch-commits] [llvm] [llvm] Extract and propagate indirect call type id (PR #87575)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Feb 11 14:07:14 PST 2025
================
@@ -3631,6 +3631,12 @@ bool X86FastISel::fastLowerCall(CallLoweringInfo &CLI) {
CLI.NumResultRegs = RVLocs.size();
CLI.Call = MIB;
+ // Add call site info for call graph section.
+ if (TM.Options.EmitCallGraphSection && CB && CB->isIndirectCall()) {
+ MachineFunction::CallSiteInfo CSInfo(*CB);
+ MF->addCallSiteInfo(CLI.Call, std::move(CSInfo));
----------------
Prabhuk wrote:
Only other location which doesn't use std::move is in `llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp` where the temporary returned from `DAG->getCallSiteInfo(Node)` is directly passed to `addCallSiteInfo`. Adding std::move there will prevent copy elision.
https://github.com/llvm/llvm-project/pull/87575
More information about the llvm-branch-commits
mailing list