COFF: Run InputFile::parse() in background using std::async().
Previously, InputFile::parse() was run in batch. We construct a list of all input files and call parse() on each file using parallel_for_each. That means we cannot start parsing files until we get a complete list of input files, although InputFile::parse() is safe to call from anywhere. This patch makes it asynchronous. As soon as we add a file to the symbol table, we now start parsing the file using std::async(). This change shortens self-hosting time (650 ms) by 28 ms. It's about 4% improvement. llvm-svn: 248109
Loading
Please sign in to comment