mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 19:52:54 +01:00
Improve the inlining cost function a bit.
Little practical effect. llvm-svn: 62908
This commit is contained in:
parent
d386e82ec9
commit
1867040e00
@ -121,9 +121,12 @@ void InlineCostAnalyzer::FunctionInfo::analyzeFunction(Function *F) {
|
||||
}
|
||||
|
||||
// Calls often compile into many machine instructions. Bump up their
|
||||
// cost to reflect this.
|
||||
if (!isa<IntrinsicInst>(II))
|
||||
NumInsts += 5;
|
||||
// cost to reflect this. Allow an extra instruction per parameter.
|
||||
if (!isa<IntrinsicInst>(II)) {
|
||||
for (CallSite::arg_iterator I = CS.arg_begin(), E = CS.arg_end();
|
||||
I != E; ++I)
|
||||
NumInsts ++;
|
||||
}
|
||||
}
|
||||
|
||||
if (const AllocaInst *AI = dyn_cast<AllocaInst>(II)) {
|
||||
|
Loading…
Reference in New Issue
Block a user