aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
diff options
context:
space:
mode:
authorJez Ng <jezng@fb.com>2021-04-06 15:09:14 -0400
committerJez Ng <jezng@fb.com>2021-04-06 15:10:01 -0400
commitceec610754b045cdac4ae0d705d8d9651e323fc4 (patch)
tree9aacb2cc0cd6425a2819cead3f1f3d613592ae3f /llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
parent94f75202accb26d71fd3149f410e80d602fc562d (diff)
downloadllvm-ceec610754b045cdac4ae0d705d8d9651e323fc4.zip
llvm-ceec610754b045cdac4ae0d705d8d9651e323fc4.tar.gz
llvm-ceec610754b045cdac4ae0d705d8d9651e323fc4.tar.bz2
[lld-macho] Fix & refactor symbol size calculations
I noticed two problems with the previous implementation: * N_ALT_ENTRY symbols weren't being handled correctly -- they should determine the size of the previous symbol, even though they don't cause a new section to be created * The last symbol in a section had its size calculated wrongly; the first subsection's size was used instead of the last one I decided to take the opportunity to refactor things as well, mainly to realize my observation [here](https://reviews.llvm.org/D98837#inline-931511) that we could avoid doing a binary search to match symbols with subsections. I think the resulting code is a bit simpler too. N Min Max Median Avg Stddev x 20 4.31 4.43 4.37 4.3775 0.034162922 + 20 4.32 4.43 4.38 4.3755 0.02799906 No difference proven at 95.0% confidence Reviewed By: #lld-macho, alexshap Differential Revision: https://reviews.llvm.org/D99972
Diffstat (limited to 'llvm/lib/Analysis/ModuleSummaryAnalysis.cpp')
0 files changed, 0 insertions, 0 deletions