aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/CodeGenPrepare.cpp
diff options
context:
space:
mode:
authorJez Ng <jezng@fb.com>2021-07-05 01:13:30 -0400
committerJez Ng <jezng@fb.com>2021-07-05 01:13:44 -0400
commitbcaf57cae82500f40f2348f5ee41e57b11152825 (patch)
tree59314e930f0d737dc2b80a4042e1be411b518142 /llvm/lib/CodeGen/CodeGenPrepare.cpp
parent0dad3f6ee2bba2f76a866e39a536d048a696f92c (diff)
downloadllvm-bcaf57cae82500f40f2348f5ee41e57b11152825.zip
llvm-bcaf57cae82500f40f2348f5ee41e57b11152825.tar.gz
llvm-bcaf57cae82500f40f2348f5ee41e57b11152825.tar.bz2
[lld-macho] Parse relocations quickly by assuming sorted order
clang and gcc both seem to emit relocations in reverse order of address. That means we can match relocations to their containing subsections in `O(relocs + subsections)` rather than the `O(relocs * log(subsections))` that our previous binary search implementation required. Unfortunately, `ld -r` can still emit unsorted relocations, so we have a fallback code path for that (less common) case. Numbers for linking chromium_framework on my 3.2 GHz 16-Core Intel Xeon W: N Min Max Median Avg Stddev x 20 4.04 4.11 4.075 4.0775 0.018027756 + 20 3.95 4.02 3.98 3.985 0.020900768 Difference at 95.0% confidence -0.0925 +/- 0.0124919 -2.26855% +/- 0.306361% (Student's t, pooled s = 0.0195172) Reviewed By: #lld-macho, thakis Differential Revision: https://reviews.llvm.org/D105410
Diffstat (limited to 'llvm/lib/CodeGen/CodeGenPrepare.cpp')
0 files changed, 0 insertions, 0 deletions