[PATCH] D55094: Ignore PhiNodes when mapping sample profile data
David Callahan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 29 16:53:25 PST 2018
david2050 created this revision.
david2050 added reviewers: danielcdh, twoh.
Herald added subscribers: llvm-commits, aprantl.
Like branch instructions, phi nodes frequently do not have debug information related to the block they are in and so they should be ignored.
Repository:
rL LLVM
https://reviews.llvm.org/D55094
Files:
lib/Transforms/IPO/SampleProfile.cpp
Index: lib/Transforms/IPO/SampleProfile.cpp
===================================================================
--- lib/Transforms/IPO/SampleProfile.cpp
+++ lib/Transforms/IPO/SampleProfile.cpp
@@ -538,10 +538,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.175994.patch
Type: text/x-patch
Size: 850 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181130/fac6b57a/attachment.bin>
More information about the llvm-commits
mailing list