llvm-project/lld/lib/Core
Rui Ueyama d4730ea555 Run the resolver in parallel with the reader.
This patch makes File::parse() multi-thread safe. If one thread is running
File::parse(), other threads will block if they try to call the same method.
File::parse() is idempotent, so you can safely call  multiple times.

With this change, we don't have to wait for all worker threads to finish
in Driver::link(). Previously, Driver::link() calls TaskGroup::sync() to
wait for all threads running File::parse(). This was not ideal because
we couldn't start the resolver until we parse all files.

This patch increase parallelism by making Driver::link() to not wait for
worker threads. The resolver calls parse() to make sure that the file
being read has been parsed, and then uses the file. In this approach,
the resolver can run with the parser threads in parallel.

http://reviews.llvm.org/D6994

llvm-svn: 226281
2015-01-16 15:54:13 +00:00
..
CMakeLists.txt Remove FileNode::parse. 2015-01-15 07:56:14 +00:00
DefinedAtom.cpp [mach-o] Support linker synthesized mach_header symbols. 2014-11-12 22:21:56 +00:00
Error.cpp Use std::recursive_mutex instead of llvm's SmartMutex. 2015-01-16 00:55:01 +00:00
File.cpp Run the resolver in parallel with the reader. 2015-01-16 15:54:13 +00:00
LinkingContext.cpp [Core] Remove function to not override RoundTripPasses. 2014-12-01 20:28:54 +00:00
Makefile Initial set of Makefiles 2014-06-04 09:54:07 +00:00
Resolver.cpp Run the resolver in parallel with the reader. 2015-01-16 15:54:13 +00:00
SymbolTable.cpp Follow-up to r221913. Fix some -Wcast-qual warning reasons. 2014-11-14 07:15:43 +00:00
TODO.txt remove completed items 2012-05-04 01:14:02 +00:00