[PATCH] D19704: 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
Thu Apr 28 18:23:45 PDT 2016


danielcdh created this revision.
danielcdh added reviewers: dnovillo, davidxl.
danielcdh added a subscriber: llvm-commits.

Callee name is not used to identify a callsite now, so do not read it during annotation.

http://reviews.llvm.org/D19704

Files:
  lib/Transforms/IPO/SampleProfile.cpp

Index: lib/Transforms/IPO/SampleProfile.cpp
===================================================================
--- lib/Transforms/IPO/SampleProfile.cpp
+++ lib/Transforms/IPO/SampleProfile.cpp
@@ -588,17 +588,12 @@
   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;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19704.55518.patch
Type: text/x-patch
Size: 929 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160429/1874f2d3/attachment.bin>


More information about the llvm-commits mailing list