diff options
author | Devang Patel <dpatel@apple.com> | 2010-03-13 00:45:31 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2010-03-13 00:45:31 +0000 |
commit | 877d0355bdaf05e059b4f1f4cde55ce0510e1bc0 (patch) | |
tree | 56cfb30556392db1c75cffefe05cc79b97affde3 /llvm/lib/Analysis/InlineCost.cpp | |
parent | 53149401eec07c89931a97c1d03eb906df4a2e20 (diff) | |
download | bcm5719-llvm-877d0355bdaf05e059b4f1f4cde55ce0510e1bc0.tar.gz bcm5719-llvm-877d0355bdaf05e059b4f1f4cde55ce0510e1bc0.zip |
Remove extra parameter.
llvm-svn: 98403
Diffstat (limited to 'llvm/lib/Analysis/InlineCost.cpp')
-rw-r--r-- | llvm/lib/Analysis/InlineCost.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/Analysis/InlineCost.cpp b/llvm/lib/Analysis/InlineCost.cpp index 280f5f596f8..f14dc5d3478 100644 --- a/llvm/lib/Analysis/InlineCost.cpp +++ b/llvm/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 |