[llvm] [MemProf] Support cloning for indirect calls with ThinLTO (PR #110625)

Snehasish Kumar via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 4 10:47:54 PDT 2024


================
@@ -3933,6 +4215,16 @@ bool MemProfContextDisambiguation::applyImport(Module &M) {
       MapTailCallCalleeVIToCallsite.insert({Callsite.Callee, Callsite});
     }
 
+    // Data structures for saving indirect call profile info for use in ICP with
+    // cloning.
+    struct ICallAnalysisData {
+      std::vector<InstrProfValueData> CandidateProfileData;
+      uint32_t NumCandidates;
+      uint64_t TotalCount;
+      unsigned CallsiteInfoStartIndex;
----------------
snehasish wrote:

nit: A little strange to have an unsigned when it's peers use <cstdint> types. Should this be size_t though since it's an index?

https://github.com/llvm/llvm-project/pull/110625


More information about the llvm-commits mailing list