aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorJames Molloy <james.molloy@arm.com>2016-11-14 11:14:41 +0000
committerJames Molloy <james.molloy@arm.com>2016-11-14 11:14:41 +0000
commit6df8f27c95a514b19476a0e6f66107575281f158 (patch)
treefb872b100d4b398072a9e6017a71de557a9b6024 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parent059680f3f0c1b755b04425562efdf7284ff9ac70 (diff)
downloadllvm-6df8f27c95a514b19476a0e6f66107575281f158.zip
llvm-6df8f27c95a514b19476a0e6f66107575281f158.tar.gz
llvm-6df8f27c95a514b19476a0e6f66107575281f158.tar.bz2
[InlineCost] Remove skew when calculating call costs
When calculating the cost of a call instruction we were applying a heuristic penalty as well as the cost of the instruction itself. However, when calculating the benefit from inlining we weren't discounting the equivalent penalty for the call instruction that would be removed! This caused skew in the calculation and meant we wouldn't inline in the following, trivial case: int g() { h(); } int f() { g(); } llvm-svn: 286814
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions