[llvm] 63c27c5 - Use getCanonicalFnName for callee name

via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 27 13:15:13 PDT 2022


Author: wlei
Date: 2022-10-27T13:14:47-07:00
New Revision: 63c27c5c753308144259d8f15f94216e582636ab

URL: https://github.com/llvm/llvm-project/commit/63c27c5c753308144259d8f15f94216e582636ab
DIFF: https://github.com/llvm/llvm-project/commit/63c27c5c753308144259d8f15f94216e582636ab.diff

LOG: Use getCanonicalFnName for callee name

Added: 
    

Modified: 
    llvm/lib/Transforms/IPO/SampleProfile.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/IPO/SampleProfile.cpp b/llvm/lib/Transforms/IPO/SampleProfile.cpp
index fc2ceae939196..f01a3ef867619 100644
--- a/llvm/lib/Transforms/IPO/SampleProfile.cpp
+++ b/llvm/lib/Transforms/IPO/SampleProfile.cpp
@@ -2077,7 +2077,7 @@ void SampleProfileMatcher::detectProfileMismatch(const Function &F,
 
         StringRef CalleeName;
         if (Function *Callee = CB->getCalledFunction())
-          CalleeName = Callee->getName();
+          CalleeName = FunctionSamples::getCanonicalFnName(Callee->getName());
 
         const auto CTM = FS.findCallTargetMapAt(IRCallsite);
         const auto CallsiteFS = FS.findFunctionSamplesMapAt(IRCallsite);


        


More information about the llvm-commits mailing list