[llvm] r300541 - [SampleProfile] Skip intrinsic calls when visiting callsites in InlineHotFunctions.
Andrea Di Biagio via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 18 03:08:53 PDT 2017
Author: adibiagio
Date: Tue Apr 18 05:08:53 2017
New Revision: 300541
URL: http://llvm.org/viewvc/llvm-project?rev=300541&view=rev
Log:
[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
Modified:
llvm/trunk/lib/Transforms/IPO/SampleProfile.cpp
Modified: llvm/trunk/lib/Transforms/IPO/SampleProfile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/SampleProfile.cpp?rev=300541&r1=300540&r2=300541&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/SampleProfile.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/SampleProfile.cpp Tue Apr 18 05:08:53 2017
@@ -677,7 +677,7 @@ bool SampleProfileLoader::inlineHotFunct
for (auto &I : BB.getInstList()) {
const FunctionSamples *FS = nullptr;
if ((isa<CallInst>(I) || isa<InvokeInst>(I)) &&
- (FS = findCalleeFunctionSamples(I))) {
+ !isa<IntrinsicInst>(I) && (FS = findCalleeFunctionSamples(I))) {
Candidates.push_back(&I);
if (callsiteIsHot(Samples, FS))
Hot = true;
More information about the llvm-commits
mailing list