forked from OSchip/llvm-project
[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
This commit is contained in:
parent
d9ff1cd213
commit
e3edef0977
|
@ -677,7 +677,7 @@ bool SampleProfileLoader::inlineHotFunctions(
|
|||
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;
|
||||
|
|
Loading…
Reference in New Issue