[PATCH] D105410: [lld-macho] Parse relocations quickly by assuming sorted order

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 4 18:25:33 PDT 2021


int3 added a comment.

I forgot to test one more input generator: aside from gcc and clang, we also need to worry about `ld -r`. Turns out `ld64` does indeed emit unsorted relocations :(

It's easy enough to handle though, we can easily fall back to binary searching in that case, which should be pretty rare, so this optimization still holds.

ConcatOutputSection will have to be updated as well to handle unsorted, I will look at that in a separate diff.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105410/new/

https://reviews.llvm.org/D105410



More information about the llvm-commits mailing list