[PATCH] D105915: [CallSiteInfo][CallGraphSection] Extend CallSiteInfo for indirect call type ids

Matt Morehouse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 23 10:34:06 PDT 2021


morehouse added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/MachineFunction.h:425
+
+    CallSiteInfo() : TypeId(nullptr) {}
+
----------------
This constructor is implicit from the above `TypeId = nullptr`.  We can just remove this.


================
Comment at: llvm/include/llvm/CodeGen/MachineFunction.h:430
+    /// call graph section.
+    CallSiteInfo(const CallBase &CB) : TypeId(nullptr) {
+      // Call graph section needs numeric type id only for indirect calls.
----------------
We can also rely on the default member initializer here.


================
Comment at: llvm/lib/Target/X86/X86FastISel.cpp:3584-3586
+    auto CSInfo = MachineFunction::CallSiteInfo(*CB);
+    MF->addCallSiteInfo(CLI.Call, std::move(CSInfo));
+  }
----------------



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105915



More information about the llvm-commits mailing list