summaryrefslogtreecommitdiff
path: root/lib/Analysis/InlineCost.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-03-13 00:45:31 +0000
committerDevang Patel <dpatel@apple.com>2010-03-13 00:45:31 +0000
commitf96769bed208b8a3f82b53771350dc0a743db85a (patch)
tree6aa09a3e14f49fbc132597400dad593362d90577 /lib/Analysis/InlineCost.cpp
parent3943ac38c946aaac21dbe686978d098770d7679e (diff)
downloadllvm-f96769bed208b8a3f82b53771350dc0a743db85a.tar.gz
llvm-f96769bed208b8a3f82b53771350dc0a743db85a.tar.bz2
llvm-f96769bed208b8a3f82b53771350dc0a743db85a.tar.xz
Remove extra parameter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98403 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/InlineCost.cpp')
-rw-r--r--lib/Analysis/InlineCost.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/Analysis/InlineCost.cpp b/lib/Analysis/InlineCost.cpp
index 280f5f596f..f14dc5d347 100644
--- a/lib/Analysis/InlineCost.cpp
+++ b/lib/Analysis/InlineCost.cpp
@@ -22,7 +22,7 @@ using namespace llvm;
// instructions will be constant folded if the specified value is constant.
//
unsigned InlineCostAnalyzer::FunctionInfo::
-CountCodeReductionForConstant(Value *V, CodeMetrics &Metrics) {
+CountCodeReductionForConstant(Value *V) {
unsigned Reduction = 0;
for (Value::use_iterator UI = V->use_begin(), E = V->use_end(); UI != E; ++UI)
if (isa<BranchInst>(*UI) || isa<SwitchInst>(*UI)) {
@@ -71,7 +71,7 @@ CountCodeReductionForConstant(Value *V, CodeMetrics &Metrics) {
// And any other instructions that use it which become constants
// themselves.
- Reduction += CountCodeReductionForConstant(&Inst, Metrics);
+ Reduction += CountCodeReductionForConstant(&Inst);
}
}
@@ -242,9 +242,8 @@ void InlineCostAnalyzer::FunctionInfo::analyzeFunction(Function *F) {
// code can be eliminated if one of the arguments is a constant.
ArgumentWeights.reserve(F->arg_size());
for (Function::arg_iterator I = F->arg_begin(), E = F->arg_end(); I != E; ++I)
- ArgumentWeights.
- push_back(ArgInfo(CountCodeReductionForConstant(I, Metrics),
- CountCodeReductionForAlloca(I)));
+ ArgumentWeights.push_back(ArgInfo(CountCodeReductionForConstant(I),
+ CountCodeReductionForAlloca(I)));
}
// getInlineCost - The heuristic used to determine if we should inline the