mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 13:11:39 +01:00
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. llvm-svn: 124991
This commit is contained in:
parent
61133e38a9
commit
b81307b728
@ -242,11 +242,6 @@ void InlineCostAnalyzer::FunctionInfo::analyzeFunction(Function *F) {
|
|||||||
if (Metrics.NumRets==1)
|
if (Metrics.NumRets==1)
|
||||||
--Metrics.NumInsts;
|
--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
|
// 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.
|
// code can be eliminated if one of the arguments is a constant.
|
||||||
ArgumentWeights.reserve(F->arg_size());
|
ArgumentWeights.reserve(F->arg_size());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user