[PATCH] D123301: [lld-macho][nfc] Factor out & micro-optimize findSymbolAtOffset

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 7 05:55:30 PDT 2022


thakis accepted this revision.
thakis added a comment.
This revision is now accepted and ready to land.

Do you see a speedup from the microoptimization in some other benchmark? If not, omit it (?)



================
Comment at: lld/MachO/InputFiles.cpp:1020
-        assert(referentIsec->wasCoalesced);
-        ++it;
-        continue;
----------------
Previously we advanced it instead of doing `it = isec->relocs.erase(it)` if nothing was found. The rhs doesn't do that. Is that intentional?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123301



More information about the llvm-commits mailing list