[compiler-rt] [llvm] [TypeProf][InstrPGO] Introduce raw and instr profile format change for type profiling. (PR #81691)
Snehasish Kumar via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 20 18:12:10 PST 2024
================
@@ -71,6 +75,19 @@ uint64_t __llvm_profile_get_data_size(const __llvm_profile_data *Begin,
return __llvm_profile_get_num_data(Begin, End) * sizeof(__llvm_profile_data);
}
+COMPILER_RT_VISIBILITY
+uint64_t __llvm_profile_get_num_vtable(const VTableProfData *Begin,
+ const VTableProfData *End) {
+ intptr_t EndI = (intptr_t)End, BeginI = (intptr_t)Begin;
+ return (EndI + sizeof(VTableProfData) - 1 - BeginI) / sizeof(VTableProfData);
----------------
snehasish wrote:
I think new code should not include it just because it was there before. If you update the old code and it breaks something post-commit then reverting this patch will be painful. If you want to keep things consistent, I would split out the change to the old code as a small patch and submit it soon (and monitor for any breakage - though I believe it is unlikely to happen).
https://github.com/llvm/llvm-project/pull/81691
More information about the llvm-commits
mailing list