Skip to content

Commit ab5ac65

Browse files
committed
[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
1 parent 2d6fb62 commit ab5ac65

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/Transforms/IPO/SampleContextTracker.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,8 +433,7 @@ ContextTrieNode *SampleContextTracker::getContextFor(const DILocation *DIL) {
433433
if (Name.empty())
434434
Name = PrevDIL->getScope()->getSubprogram()->getName();
435435
S.push_back(
436-
std::make_pair(FunctionSamples::getCallSiteIdentifier(DIL),
437-
PrevDIL->getScope()->getSubprogram()->getLinkageName()));
436+
std::make_pair(FunctionSamples::getCallSiteIdentifier(DIL), Name));
438437
PrevDIL = DIL;
439438
}
440439

0 commit comments

Comments
 (0)