[PATCH] D50569: Change how we handle -wrap.

Matthew Koontz via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 10 11:31:12 PDT 2018


matthew.koontz added inline comments.


================
Comment at: lld/ELF/Driver.cpp:1386
+template <class ELFT> static void wrapSymbols(ArrayRef<WrappedSymbol> Wrapped) {
+  // Update pointers in input files. This algorithm is O(m*n) where m is
+  // the number of symbols in files and n is the number of wrapped
----------------
This noticeably increases the link time of the project I work on (from ~6 to ~7 seconds on my computer). Placing the WrappedSymbols inside of a temporary lookup table like std::unordered_map fixes this. Maybe this should be considered in case other projects wrap as many symbols as mine?


https://reviews.llvm.org/D50569





More information about the llvm-commits mailing list