mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-05 18:17:00 +00:00
Inliner tweak. Function calls should cost more than one instruction!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53712 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b31b06d04b
commit
066fcf8628
@ -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()))
|
||||
|
Loading…
x
Reference in New Issue
Block a user