This is a patch to discuss performance improvements, and not for
ready for submittion. It doesn't compile.
Problem:
Currently LLD parses .o files given via the command line in parallel
(see Driver.cpp). That's better than nothing, but not good enough to
use as much available cores as possible, because .a file parsing is
paralellized.
When the resolver finds a symbol in an archive file, it extracts the
file from the archive, parses it, add its symbols to the symbol table,
and then continue. It's a serial process.
Solution:
Add preload() member function to InputGraph to let it start a (light-
weight) task in background to parse a file. With this we would
have multiple tasks in background. The effect of preload() is that
it may shorten the response time of ArchiveFile::find() -- other than
that it has no effect observable from outside.
I think this the simplest interface for doing what I want to do. Any
opinions?
spell errors.