[PATCH] Add preload method.

Rui Ueyama ruiu at google.com
Fri Sep 12 16:00:45 PDT 2014


Hi t.p.northover, kledzik,

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?

http://reviews.llvm.org/D5340

Files:
  include/lld/Core/InputGraph.h
  lib/Core/Resolver.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5340.13667.patch
Type: text/x-patch
Size: 1453 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140912/37905135/attachment.bin>


More information about the llvm-commits mailing list