================
@@ -124,6 +124,28 @@ static bool findRefEdges(ModuleSummaryIndex &Index, const 
User *CurUser,
         Worklist.push_back(Operand);
     }
   }
+
+  const Instruction *I = dyn_cast<Instruction>(CurUser);
+  if (I) {
+    uint32_t ActualNumValueData = 0;
+    uint64_t TotalCount = 0;
+    // 24 is the maximum number of values preserved for one instrumented site,
+    // defined by INSTR_PROF_DEFAULT_NUM_VAL_PER_SITE in
+    // compiler-rt/lib/profile/InstrProfilingValue.c; passing 24 as
+    // `MaxNumValueData` controls the max number of elements in the returned
+    // array. The actual number of values is gated by the number of ops in 
!prof
+    // metadata.
+    auto ValueDataArray = getValueProfDataFromInst(
+        *I, IPVK_VTableTarget, 24 /* MaxNumValueData */, ActualNumValueData,
----------------
teresajohnson wrote:

Do we really want 24? Or should we limit to something smaller (and tunable), 
like we do for virtual function pointer profiles in ICP.

https://github.com/llvm/llvm-project/pull/79381
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to