Skip to content

Commit e3edef0

Browse files
committedApr 18, 2017
[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
1 parent d9ff1cd commit e3edef0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎llvm/lib/Transforms/IPO/SampleProfile.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@ bool SampleProfileLoader::inlineHotFunctions(
677677
for (auto &I : BB.getInstList()) {
678678
const FunctionSamples *FS = nullptr;
679679
if ((isa<CallInst>(I) || isa<InvokeInst>(I)) &&
680-
(FS = findCalleeFunctionSamples(I))) {
680+
!isa<IntrinsicInst>(I) && (FS = findCalleeFunctionSamples(I))) {
681681
Candidates.push_back(&I);
682682
if (callsiteIsHot(Samples, FS))
683683
Hot = true;

0 commit comments

Comments
 (0)
Please sign in to comment.