[PATCH] D106599: [CSSPGO] Fix a typo in SampleContextTracker

Hongtao Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 22 14:42:38 PDT 2021


hoy created this revision.
Herald added subscribers: ormris, modimo, wenlei, hiraditya.
hoy requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D106599

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


Index: llvm/lib/Transforms/IPO/SampleContextTracker.cpp
===================================================================
--- llvm/lib/Transforms/IPO/SampleContextTracker.cpp
+++ llvm/lib/Transforms/IPO/SampleContextTracker.cpp
@@ -433,8 +433,7 @@
     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;
   }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106599.360983.patch
Type: text/x-patch
Size: 609 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210722/7d116490/attachment.bin>


More information about the llvm-commits mailing list