Skip to content

Commit

Permalink
Remove premature optimization that avoided calculating argument weights
Browse files Browse the repository at this point in the history
if we weren't going to inline the function. The rest of the code using
this was removed.

Fixes PR9154.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124991 91177308-0d34-0410-b5e6-96231b3b80d8
echristo committed Feb 6, 2011
1 parent 5d43ff4 commit bd75021
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions lib/Analysis/InlineCost.cpp
Original file line number Diff line number Diff line change
@@ -242,11 +242,6 @@ void InlineCostAnalyzer::FunctionInfo::analyzeFunction(Function *F) {
if (Metrics.NumRets==1)
--Metrics.NumInsts;

// Don't bother calculating argument weights if we are never going to inline
// the function anyway.
if (NeverInline())
return;

// Check out all of the arguments to the function, figuring out how much
// code can be eliminated if one of the arguments is a constant.
ArgumentWeights.reserve(F->arg_size());

0 comments on commit bd75021

Please sign in to comment.