[lld] r182786 - [Driver] Parallelize reading initial object files.

Nick Kledzik kledzik at apple.com
Tue May 28 12:21:36 PDT 2013


On May 28, 2013, at 12:00 PM, Rui Ueyama <ruiu at google.com> wrote:
> +
> +    tg.spawn([&, index] {
> +      if (error_code ec = targetInfo.readFile(input.getPath(), files[index])) {
> +        diagnostics << "Failed to read file: " << input.getPath()
> +                    << ": " << ec.message() << "\n";
> +        fail = true;
> +        return;
> +      }
> +    });
> +    ++index;
> 
> It's coming back to the other thread, but if targetInfo needs to be updated during input file parsing, parallelizing this piece of code would result in unpredictable behavior. I'm not saying that we can't paralellize this but just don't have a good idea to deal with that.

How fast can the linker options be extracted from the file?  If fast, then one model would be to make a serialized pass over the input files just to collect linker options and update target info, then the next pass would be the parallel parsing of the input files.  

-Nick

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130528/e46fb727/attachment.html>


More information about the llvm-commits mailing list