[PATCH] D25826: [ELF] Show error location for 'undefined symbol' errors

Eugene Leviant via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 22 02:08:51 PDT 2016

evgeny777 added inline comments.

Comment at: ELF/InputFiles.h:51
+// for each object file we link.
+template <class ELFT> class DIHelper {
ruiu wrote:
> I think this is too smart, at least as the initial implementation. This function is run only when an error occurs, and for error cases, we don't pursue performance. Instead I'd like to keep it simple as possible. So, could you please remove this class and define a non-member function? I think it is okay to parse debug info for each error message.
> could you please remove this class

I really really wouldn't like to do this. The main reason is that LLVM DWARF parser is very slow (main reason why lldb is so slow). If you want the numbers, here they are:

command (reports about 3K errors):
ld.lld LoopConvertCheck.cpp.o -o a.out
time w/o caching: 3m31.165s
time with caching: 0m1.659s

This is release build of lld on i7-2600K / SSD
Debug build had worked over 15 minutes, before I terminated it with Ctrl-C

May be it's better to simplify DIHelper somehow?


More information about the llvm-commits mailing list