[PATCH] D45791: Cache getSymVA

Rafael Avila de Espindola via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 18 18:20:19 PDT 2018


espindola created this revision.
espindola added reviewers: peter.smith, ruiu, pcc.
Herald added subscribers: kristof.beyls, arichardson, emaste.

It is common for getSymVA to be called at least twice for each symbol. Once for the symbol table, once for a relocation using it.

The operation is fairly expensive, so it is probably worth caching it (I will attach the benchmark results).

One issue with this is that with thunks getVA is called multiple times and produces different results as thunks are added. It is easy to just disable this for architectures that need thunks, but I am curious if someone more familiar with thunks thinks we can do better.

BTW, we should probably add testcase with thunks to the benchmarks we use. Peter, do you have a chromium build for aarch64 we could use?


https://reviews.llvm.org/D45791

Files:
  ELF/Symbols.cpp
  ELF/Symbols.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45791.143029.patch
Type: text/x-patch
Size: 3859 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180419/5268f81a/attachment.bin>


More information about the llvm-commits mailing list