[lld] r314746 - Add a comment.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 2 17:45:24 PDT 2017
Author: ruiu
Date: Mon Oct 2 17:45:24 2017
New Revision: 314746
URL: http://llvm.org/viewvc/llvm-project?rev=314746&view=rev
Log:
Add a comment.
Modified:
lld/trunk/ELF/SyntheticSections.cpp
Modified: lld/trunk/ELF/SyntheticSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SyntheticSections.cpp?rev=314746&r1=314745&r2=314746&view=diff
==============================================================================
--- lld/trunk/ELF/SyntheticSections.cpp (original)
+++ lld/trunk/ELF/SyntheticSections.cpp Mon Oct 2 17:45:24 2017
@@ -2236,7 +2236,8 @@ void MergeNoTailSection::finalizeContent
for (size_t I = 0; I < NumShards; ++I)
Shards.emplace_back(StringTableBuilder::RAW, Alignment);
- // Concurrency level. Must be a power of 2.
+ // Concurrency level. Must be a power of 2 to avoid expensive modulo
+ // operations in the following tight loop.
size_t Concurrency = 1;
if (Config->Threads)
if (int N = std::thread::hardware_concurrency())
More information about the llvm-commits
mailing list