1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

Inliner tweak. Function calls should cost more than one instruction!

llvm-svn: 53712
This commit is contained in:
Evan Cheng 2008-07-17 01:31:49 +00:00
parent 7fb36c8bba
commit a7598b31ee

View File

@ -119,6 +119,11 @@ void InlineCostAnalyzer::FunctionInfo::analyzeFunction(Function *F) {
NeverInline = true;
return;
}
// Calls often compile into many machine instructions. Bump up their
// cost to reflect this.
if (!isa<IntrinsicInst>(II))
NumInsts += 5;
}
if (isa<ExtractElementInst>(II) || isa<VectorType>(II->getType()))