[PATCH] D55094: Ignore PhiNodes when mapping sample profile data

David Callahan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 14 11:10:33 PST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL351102: Ignore PhiNodes when mapping sample profile data (authored by david2050, committed by ).

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55094/new/

https://reviews.llvm.org/D55094

Files:
  llvm/trunk/lib/Transforms/IPO/SampleProfile.cpp


Index: llvm/trunk/lib/Transforms/IPO/SampleProfile.cpp
===================================================================
--- llvm/trunk/lib/Transforms/IPO/SampleProfile.cpp
+++ llvm/trunk/lib/Transforms/IPO/SampleProfile.cpp
@@ -544,10 +544,10 @@
   if (!FS)
     return std::error_code();
 
-  // Ignore all intrinsics and branch instructions.
-  // Branch instruction usually contains debug info from sources outside of
+  // Ignore all intrinsics, phinodes and branch instructions.
+  // Branch and phinodes instruction usually contains debug info from sources outside of
   // the residing basic block, thus we ignore them during annotation.
-  if (isa<BranchInst>(Inst) || isa<IntrinsicInst>(Inst))
+  if (isa<BranchInst>(Inst) || isa<IntrinsicInst>(Inst) || isa<PHINode>(Inst))
     return std::error_code();
 
   // If a direct call/invoke instruction is inlined in profile


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55094.181611.patch
Type: text/x-patch
Size: 883 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190114/bd9fb005/attachment.bin>


More information about the llvm-commits mailing list