[compiler-rt] [llvm] [InstrPGO][TypeProf]Annotate vtable types when they are present in the profile (PR #99402)
Mingming Liu via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 22 10:05:57 PDT 2024
================
@@ -109,6 +109,25 @@
// ICTEXT: {{.*}}instrprof-vtable-value-prof.cpp;_ZTVN12_GLOBAL__N_18Derived2E:750
// ICTEXT: _ZTV8Derived1:250
+// When vtable value profiles exist, pgo-instr-use pass should annotate them
+// even if `-enable-vtable-value-profiling` is not explicitly on.
+// RUN: %clangxx -m64 -fprofile-use=test.profdata -fuse-ld=lld -O2 \
+// RUN: -mllvm -print-after=pgo-instr-use -mllvm -filter-print-funcs=main \
+// RUN: -mllvm -print-module-scope %s 2>&1 | FileCheck %s --check-prefix=ANNOTATE
+
+// ANNOTATE-NOT: Inconsistent number of value sites
+// ANNOTATE: !{!"VP", i32 2
+
+// When vtable value profiles exist, pgo-instr-use pass will not annotate them
+// if `-max-num-vtable-annotaitons` is set to zero.
----------------
minglotus-6 wrote:
The option name is wrong. I corrected it.
https://github.com/llvm/llvm-project/pull/99402
More information about the llvm-commits
mailing list