Remove extra parameter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98403 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel 2010-03-13 00:45:31 +00:00
parent 3943ac38c9
commit f96769bed2
2 changed files with 5 additions and 6 deletions

View File

@ -152,7 +152,7 @@ namespace llvm {
/// CountCodeReductionForConstant - Figure out an approximation for how /// CountCodeReductionForConstant - Figure out an approximation for how
/// many instructions will be constant folded if the specified value is /// many instructions will be constant folded if the specified value is
/// constant. /// constant.
unsigned CountCodeReductionForConstant(Value *V, CodeMetrics &M); unsigned CountCodeReductionForConstant(Value *V);
/// CountCodeReductionForAlloca - Figure out an approximation of how much /// CountCodeReductionForAlloca - Figure out an approximation of how much
/// smaller the function will be if it is inlined into a context where an /// smaller the function will be if it is inlined into a context where an

View File

@ -22,7 +22,7 @@ using namespace llvm;
// instructions will be constant folded if the specified value is constant. // instructions will be constant folded if the specified value is constant.
// //
unsigned InlineCostAnalyzer::FunctionInfo:: unsigned InlineCostAnalyzer::FunctionInfo::
CountCodeReductionForConstant(Value *V, CodeMetrics &Metrics) { CountCodeReductionForConstant(Value *V) {
unsigned Reduction = 0; unsigned Reduction = 0;
for (Value::use_iterator UI = V->use_begin(), E = V->use_end(); UI != E; ++UI) for (Value::use_iterator UI = V->use_begin(), E = V->use_end(); UI != E; ++UI)
if (isa<BranchInst>(*UI) || isa<SwitchInst>(*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 // And any other instructions that use it which become constants
// themselves. // 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. // code can be eliminated if one of the arguments is a constant.
ArgumentWeights.reserve(F->arg_size()); ArgumentWeights.reserve(F->arg_size());
for (Function::arg_iterator I = F->arg_begin(), E = F->arg_end(); I != E; ++I) for (Function::arg_iterator I = F->arg_begin(), E = F->arg_end(); I != E; ++I)
ArgumentWeights. ArgumentWeights.push_back(ArgInfo(CountCodeReductionForConstant(I),
push_back(ArgInfo(CountCodeReductionForConstant(I, Metrics), CountCodeReductionForAlloca(I)));
CountCodeReductionForAlloca(I)));
} }
// getInlineCost - The heuristic used to determine if we should inline the // getInlineCost - The heuristic used to determine if we should inline the