[clang] [compiler-rt] [llvm] [InstrFDO][TypeProf] Implement binary instrumentation and profile read/write (PR #66825)

Mingming Liu via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 5 22:09:32 PST 2024


================
@@ -560,6 +602,28 @@ Error InstrProfSymtab::addFuncWithName(Function &F, StringRef PGOFuncName) {
   return Error::success();
 }
 
+uint64_t InstrProfSymtab::getVTableHashFromAddress(uint64_t Address) {
+  finalizeSymtab();
----------------
minglotus-6 wrote:

This is to make sure the vectors are sorted.
* `finalizeSymtab` runs `llvm::sort` the first time it's called and marks `Sorted` as true ; subsequent calls returns early if `Sorted` is true.

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


More information about the cfe-commits mailing list