[PATCH] D13501: [ELF2] Add -wrap switch

Igor Kudrin via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 7 06:59:20 PDT 2015


ikudrin added a comment.

In http://reviews.llvm.org/D13501#261600, @ruiu wrote:

> This patch needs redesigning because we don't want to look up hash tables more than once for each symbol. In this patch, names for undefined symbols are looked up twice -- once in the InputFile.cpp and the other in SymbolTable.cpp.


We have to look up for different names for defined and undefined symbols, so we can't use just one hash map.

In most cases, when the -wrap switch is not used and UndefSymNameReplacement is empty, addition lookup will be very cheap, without calculating a hash value at all. On the other hand, we can use just std::map which expected to work really quick in our case.


http://reviews.llvm.org/D13501





More information about the llvm-commits mailing list