[llvm-branch-commits] [llvm] [InstrProf] Add vtables with type metadata into symtab to look it up with GUID (PR #81051)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Feb 12 19:54:50 PST 2024


================
@@ -560,35 +586,50 @@ Error InstrProfSymtab::initVTableNamesFromCompressedStrings(
       std::bind(&InstrProfSymtab::addVTableName, this, std::placeholders::_1));
 }
 
-Error InstrProfSymtab::addFuncWithName(Function &F, StringRef PGOFuncName) {
-  if (Error E = addFuncName(PGOFuncName))
-    return E;
-  MD5FuncMap.emplace_back(Function::getGUID(PGOFuncName), &F);
+StringRef InstrProfSymtab::getCanonicalName(StringRef PGOName,
----------------
WenleiHe wrote:

This feels quite similar to `FunctionSamples::getCanonicalFnName`, wondering if they can be unified into a general purpose helper.

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


More information about the llvm-branch-commits mailing list