summaryrefslogtreecommitdiff
path: root/lib/Analysis/InlineCost.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2011-02-06 21:27:46 +0000
committerEric Christopher <echristo@apple.com>2011-02-06 21:27:46 +0000
commitbd75021465e7f8c81785e692cfd3ce559764e46f (patch)
treeaea9325a61522dbaeddd320a4c3ef7fc015300fb /lib/Analysis/InlineCost.cpp
parent5d43ff4e7ea30eaf5a1c417f0ec528900f5c83f2 (diff)
downloadllvm-bd75021465e7f8c81785e692cfd3ce559764e46f.tar.gz
llvm-bd75021465e7f8c81785e692cfd3ce559764e46f.tar.bz2
llvm-bd75021465e7f8c81785e692cfd3ce559764e46f.tar.xz
Remove premature optimization that avoided calculating argument weights
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
Diffstat (limited to 'lib/Analysis/InlineCost.cpp')
-rw-r--r--lib/Analysis/InlineCost.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/lib/Analysis/InlineCost.cpp b/lib/Analysis/InlineCost.cpp
index 58f38afc6e..47f91cfc3b 100644
--- a/lib/Analysis/InlineCost.cpp
+++ b/lib/Analysis/InlineCost.cpp
@@ -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());