diff options
author | Dale Johannesen <dalej@apple.com> | 2009-01-24 21:49:34 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2009-01-24 21:49:34 +0000 |
commit | 381e6f6b7d2e8321af30363fe435d5ec8863c6d5 (patch) | |
tree | 2a4f623d0c2088354d1b4e22579734c024a3a30d | |
parent | e46a686dc237735831cd4ce410a8cbe396ec08ab (diff) | |
download | external_llvm-381e6f6b7d2e8321af30363fe435d5ec8863c6d5.zip external_llvm-381e6f6b7d2e8321af30363fe435d5ec8863c6d5.tar.gz external_llvm-381e6f6b7d2e8321af30363fe435d5ec8863c6d5.tar.bz2 |
Revert previous change; even this mild and clearly
more accurate change loses more than it gains on
benchmarks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62938 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Transforms/Utils/InlineCost.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/Transforms/Utils/InlineCost.cpp b/lib/Transforms/Utils/InlineCost.cpp index 37d2c03..69cd934 100644 --- a/lib/Transforms/Utils/InlineCost.cpp +++ b/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)) { |