summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorDavid Callahan <dcallahan@fb.com>2019-01-14 18:35:43 +0000
committerDavid Callahan <dcallahan@fb.com>2019-01-14 18:35:43 +0000
commit1b4623176447a8242acbcc509441dd2585f0815d (patch)
treea15b207ac83b85af7b1548e32bbab30edbca4584 /llvm/lib/Transforms
parente07cdb107e775cdb872752a95d1f622b2c1097fd (diff)
downloadbcm5719-llvm-1b4623176447a8242acbcc509441dd2585f0815d.tar.gz
bcm5719-llvm-1b4623176447a8242acbcc509441dd2585f0815d.zip
Merge branch 'arcpatch-D55094'
llvm-svn: 351092
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/IPO/SampleProfile.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/IPO/SampleProfile.cpp b/llvm/lib/Transforms/IPO/SampleProfile.cpp
index 06a1ce89827..1e86e04a79d 100644
--- a/llvm/lib/Transforms/IPO/SampleProfile.cpp
+++ b/llvm/lib/Transforms/IPO/SampleProfile.cpp
@@ -544,10 +544,10 @@ ErrorOr<uint64_t> SampleProfileLoader::getInstWeight(const Instruction &Inst) {
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
OpenPOWER on IntegriCloud