[llvm-branch-commits] [llvm] [BOLT] Name similarity function matching (PR #95884)

Amir Ayupov via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Jun 21 09:37:13 PDT 2024


================
@@ -415,6 +422,75 @@ Error YAMLProfileReader::readProfile(BinaryContext &BC) {
     if (!YamlBF.Used && BF && !ProfiledFunctions.count(BF))
       matchProfileToFunction(YamlBF, *BF);
 
+  // Uses name similarity to match functions that were not matched by name.
+  uint64_t MatchedWithDemangledName = 0;
+
+  if (opts::NameSimilarityFunctionMatchingThreshold > 0) {
+    auto DemangleName = [&](const char* String) {
+      int Status = 0;
+      char *DemangledName = abi::__cxa_demangle(String,
----------------
aaupov wrote:

Let's use LLVM's `demangle` (llvm/Demangle/Demangle.h)

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


More information about the llvm-branch-commits mailing list