[lld] r315098 - Revert r314616: Run writeTo() concurrently.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 6 13:12:44 PDT 2017
Author: ruiu
Date: Fri Oct 6 13:12:43 2017
New Revision: 315098
URL: http://llvm.org/viewvc/llvm-project?rev=315098&view=rev
Log:
Revert r314616: Run writeTo() concurrently.
This reverts commit r314616 because nested parallel-for loops can hang.
Our ThreadPoolExecutor is not necessarily able to handle nested calls.
Modified:
lld/trunk/ELF/Writer.cpp
Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=315098&r1=315097&r2=315098&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Fri Oct 6 13:12:43 2017
@@ -1911,16 +1911,14 @@ template <class ELFT> void Writer<ELFT>:
// In -r or -emit-relocs mode, write the relocation sections first as in
// ELf_Rel targets we might find out that we need to modify the relocated
// section while doing it.
- parallelForEach(OutputSections, [&](OutputSection *Sec) {
+ for (OutputSection *Sec : OutputSections)
if (Sec->Type == SHT_REL || Sec->Type == SHT_RELA)
Sec->writeTo<ELFT>(Buf + Sec->Offset);
- });
- parallelForEach(OutputSections, [&](OutputSection *Sec) {
+ for (OutputSection *Sec : OutputSections)
if (Sec != Out::Opd && Sec != EhFrameHdr && Sec->Type != SHT_REL &&
Sec->Type != SHT_RELA)
Sec->writeTo<ELFT>(Buf + Sec->Offset);
- });
// The .eh_frame_hdr depends on .eh_frame section contents, therefore
// it should be written after .eh_frame is written.
More information about the llvm-commits
mailing list