[PATCH] D113153: [lld-macho] Cache readFile results

Shoaib Meenai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 3 23:07:17 PDT 2021


smeenai added a comment.

This one needs to be reset in the `cleanupCallback` as well (https://github.com/llvm/llvm-project/blob/e7fdff403e849b18d93cd4a5cb760cba66a92c0b/lld/MachO/Driver.cpp#L1098), as do all the other caches you added (if they aren't already). The cache itself would technically be valid, but we free all our memory arenas at the end of a linker run, so the entries would point to freed memory.

Out of curiosity, is the link that takes 8 seconds now the same one that ld64 takes 20 seconds for? If not, I'd be curious to know how the speed for that one compares after all your changes.

Thanks for all the fixes!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113153



More information about the llvm-commits mailing list