[lld] r248098 - COFF: Actually parallelize InputFile::parse().

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 19 15:09:47 PDT 2015


What is the speed difference?
On Sep 19, 2015 5:34 PM, "Rui Ueyama via llvm-commits" <
llvm-commits at lists.llvm.org> wrote:

> Author: ruiu
> Date: Sat Sep 19 16:33:26 2015
> New Revision: 248098
>
> URL: http://llvm.org/viewvc/llvm-project?rev=248098&view=rev
> Log:
> COFF: Actually parallelize InputFile::parse().
>
> This is a follow-up patch to r248078.
>
> Modified:
>     lld/trunk/COFF/SymbolTable.cpp
>
> Modified: lld/trunk/COFF/SymbolTable.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/SymbolTable.cpp?rev=248098&r1=248097&r2=248098&view=diff
>
> ==============================================================================
> --- lld/trunk/COFF/SymbolTable.cpp (original)
> +++ lld/trunk/COFF/SymbolTable.cpp Sat Sep 19 16:33:26 2015
> @@ -56,8 +56,8 @@ void SymbolTable::readArchives() {
>    if (ArchiveQueue.empty())
>      return;
>
> -  std::for_each(ArchiveQueue.begin(), ArchiveQueue.end(),
> -                [](ArchiveFile *File) { File->parse(); });
> +  parallel_for_each(ArchiveQueue.begin(), ArchiveQueue.end(),
> +                    [](ArchiveFile *File) { File->parse(); });
>
>    // Add lazy symbols to the symbol table. Lazy symbols that conflict
>    // with existing undefined symbols are accumulated in LazySyms.
> @@ -83,8 +83,8 @@ void SymbolTable::readObjects() {
>    // Add defined and undefined symbols to the symbol table.
>    std::vector<StringRef> Directives;
>    for (size_t I = 0; I < ObjectQueue.size();) {
> -    std::for_each(ObjectQueue.begin() + I, ObjectQueue.end(),
> -                  [](InputFile *File) { File->parse(); });
> +    parallel_for_each(ObjectQueue.begin() + I, ObjectQueue.end(),
> +                      [](InputFile *File) { File->parse(); });
>      for (size_t E = ObjectQueue.size(); I != E; ++I) {
>        InputFile *File = ObjectQueue[I];
>        if (Config->Verbose)
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150919/87b111d8/attachment.html>


More information about the llvm-commits mailing list