summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2009-01-24 21:49:34 +0000
committerDale Johannesen <dalej@apple.com>2009-01-24 21:49:34 +0000
commit2b3389a626efcf3758c14698bb0caea68edf8e27 (patch)
treecbb6b581df39df0231f34b276f5e32e3cef12035 /llvm
parent887ce84b2b22cc6c1ffb0990f91640152e76ae42 (diff)
downloadbcm5719-llvm-2b3389a626efcf3758c14698bb0caea68edf8e27.tar.gz
bcm5719-llvm-2b3389a626efcf3758c14698bb0caea68edf8e27.zip
Revert previous change; even this mild and clearly
more accurate change loses more than it gains on benchmarks. llvm-svn: 62938
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Transforms/Utils/InlineCost.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/llvm/lib/Transforms/Utils/InlineCost.cpp b/llvm/lib/Transforms/Utils/InlineCost.cpp
index 37d2c0352ac..69cd9343f8c 100644
--- a/llvm/lib/Transforms/Utils/InlineCost.cpp
+++ b/llvm/lib/Transforms/Utils/InlineCost.cpp
@@ -119,14 +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. 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 ++;
- }
+ // cost to reflect this.
+ if (!isa<IntrinsicInst>(II))
+ NumInsts += 5;
}
if (const AllocaInst *AI = dyn_cast<AllocaInst>(II)) {
OpenPOWER on IntegriCloud