From e3edef09779a1cf7d4833409fc783eef3d2428cc Mon Sep 17 00:00:00 2001 From: Andrea Di Biagio Date: Tue, 18 Apr 2017 10:08:53 +0000 Subject: [PATCH] [SampleProfile] Skip intrinsic calls when visiting callsites in InlineHotFunctions. Before this patch, we always called method 'findCalleeFunctionSamples()' on intrinsic calls. However, intrinsic calls like llvm.dbg.value() are not viable candidates for obvious reasons. No functional change intended. Differential Revision: https://reviews.llvm.org/D32008 llvm-svn: 300541 --- llvm/lib/Transforms/IPO/SampleProfile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Transforms/IPO/SampleProfile.cpp b/llvm/lib/Transforms/IPO/SampleProfile.cpp index 599774e3e86b..642d80e6b8a2 100644 --- a/llvm/lib/Transforms/IPO/SampleProfile.cpp +++ b/llvm/lib/Transforms/IPO/SampleProfile.cpp @@ -677,7 +677,7 @@ bool SampleProfileLoader::inlineHotFunctions( for (auto &I : BB.getInstList()) { const FunctionSamples *FS = nullptr; if ((isa(I) || isa(I)) && - (FS = findCalleeFunctionSamples(I))) { + !isa(I) && (FS = findCalleeFunctionSamples(I))) { Candidates.push_back(&I); if (callsiteIsHot(Samples, FS)) Hot = true;