diff options
author | Jez Ng <jezng@fb.com> | 2021-04-06 15:09:14 -0400 |
---|---|---|
committer | Jez Ng <jezng@fb.com> | 2021-04-06 15:10:01 -0400 |
commit | ceec610754b045cdac4ae0d705d8d9651e323fc4 (patch) | |
tree | 9aacb2cc0cd6425a2819cead3f1f3d613592ae3f /llvm/lib/Analysis/ModuleSummaryAnalysis.cpp | |
parent | 94f75202accb26d71fd3149f410e80d602fc562d (diff) | |
download | llvm-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