[llvm] r268069 - Do not read callee name when matching IR to profile as it is not used.
Dehao Chen via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 29 10:19:10 PDT 2016
Author: dehao
Date: Fri Apr 29 12:19:10 2016
New Revision: 268069
URL: http://llvm.org/viewvc/llvm-project?rev=268069&view=rev
Log:
Do not read callee name when matching IR to profile as it is not used.
Summary: Callee name is not used to identify a callsite now, so do not read it during annotation.
Reviewers: davidxl, dnovillo
Subscribers: dnovillo, danielcdh, llvm-commits
Differential Revision: http://reviews.llvm.org/D19704
Modified:
llvm/trunk/lib/Transforms/IPO/SampleProfile.cpp
Modified: llvm/trunk/lib/Transforms/IPO/SampleProfile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/SampleProfile.cpp?rev=268069&r1=268068&r2=268069&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/SampleProfile.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/SampleProfile.cpp Fri Apr 29 12:19:10 2016
@@ -588,17 +588,12 @@ SampleProfileLoader::findFunctionSamples
if (!DIL) {
return Samples;
}
- StringRef CalleeName;
- for (const DILocation *DIL = Inst.getDebugLoc(); DIL;
- DIL = DIL->getInlinedAt()) {
+ for (DIL = DIL->getInlinedAt(); DIL; DIL = DIL->getInlinedAt()) {
DISubprogram *SP = DIL->getScope()->getSubprogram();
if (!SP)
return nullptr;
- if (!CalleeName.empty()) {
- S.push_back(LineLocation(getOffset(DIL->getLine(), SP->getLine()),
- DIL->getDiscriminator()));
- }
- CalleeName = SP->getLinkageName();
+ S.push_back(LineLocation(getOffset(DIL->getLine(), SP->getLine()),
+ DIL->getDiscriminator()));
}
if (S.size() == 0)
return Samples;
More information about the llvm-commits
mailing list