[compiler-rt] [llvm] [InstrPGO][TypeProf]Annotate vtable types when they are present in the profile (PR #99402)

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 18 13:17:52 PDT 2024


================
@@ -603,7 +603,10 @@ template <class Edge, class BBInfo> class FuncPGOInstrumentation {
       NumOfPGOMemIntrinsics += ValueSites[IPVK_MemOPSize].size();
       NumOfPGOBB += MST.bbInfoSize();
       ValueSites[IPVK_IndirectCallTarget] = VPC.get(IPVK_IndirectCallTarget);
-      if (EnableVTableValueProfiling)
+      // Collect value sites for 'pgo-instr-use' pass if `icp-max-num-vtables`
+      // is not zero.
+      if (EnableVTableValueProfiling ||
+          (!CreateGlobalVar && MaxNumVTableAnnotations != 0))
----------------
teresajohnson wrote:

Can you add a comment about why the `!CreateGlobalVar` check.

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


More information about the llvm-commits mailing list