[llvm] ab5ac65 - [CSSPGO] Fix a typo in SampleContextTracker

Hongtao Yu via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 22 16:44:57 PDT 2021


Author: Hongtao Yu
Date: 2021-07-22T16:44:50-07:00
New Revision: ab5ac659c81a453a3f58df94f39fe8ba3cd35918

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

LOG: [CSSPGO] Fix a typo in SampleContextTracker

Fixing a typo in SampleContextTracker to use debug name when debug linkage name is no present. This should only affect C programs.

Saw 0.6% perf win on Cinder which is mostly C code.

Reviewed By: wenlei, wmi

Differential Revision: https://reviews.llvm.org/D106599

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/IPO/SampleContextTracker.cpp b/llvm/lib/Transforms/IPO/SampleContextTracker.cpp
index cb1245fd5ac8..55b88ac14da5 100644
--- a/llvm/lib/Transforms/IPO/SampleContextTracker.cpp
+++ b/llvm/lib/Transforms/IPO/SampleContextTracker.cpp
@@ -433,8 +433,7 @@ ContextTrieNode *SampleContextTracker::getContextFor(const DILocation *DIL) {
     if (Name.empty())
       Name = PrevDIL->getScope()->getSubprogram()->getName();
     S.push_back(
-        std::make_pair(FunctionSamples::getCallSiteIdentifier(DIL),
-                       PrevDIL->getScope()->getSubprogram()->getLinkageName()));
+        std::make_pair(FunctionSamples::getCallSiteIdentifier(DIL), Name));
     PrevDIL = DIL;
   }
 


        


More information about the llvm-commits mailing list