Little practical effect.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62908
91177308-0d34-0410-b5e6-
96231b3b80d8
}
// 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)) {