summaryrefslogtreecommitdiffstats
path: root/lld/ELF
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2017-05-10 20:02:19 +0000
committerRui Ueyama <ruiu@google.com>2017-05-10 20:02:19 +0000
commit33d903d1b0543e4a1ee49836555ca7532d450722 (patch)
tree0586885acb8970e2b0d31710fc5ec8491118f84a /lld/ELF
parentc51d05369a4f4aa7cd9580f095e915cd53cff223 (diff)
downloadbcm5719-llvm-33d903d1b0543e4a1ee49836555ca7532d450722.tar.gz
bcm5719-llvm-33d903d1b0543e4a1ee49836555ca7532d450722.zip
Rename parallelFor -> parallelForEachN.
So that it is clear that the function is a wrapper for for_each_n. llvm-svn: 302718
Diffstat (limited to 'lld/ELF')
-rw-r--r--lld/ELF/ICF.cpp2
-rw-r--r--lld/ELF/MapFile.cpp2
-rw-r--r--lld/ELF/OutputSections.cpp2
-rw-r--r--lld/ELF/SyntheticSections.cpp2
-rw-r--r--lld/ELF/Threads.h4
5 files changed, 6 insertions, 6 deletions
diff --git a/lld/ELF/ICF.cpp b/lld/ELF/ICF.cpp
index dcf01ea8001..3722d4e3ed2 100644
--- a/lld/ELF/ICF.cpp
+++ b/lld/ELF/ICF.cpp
@@ -325,7 +325,7 @@ void ICF<ELFT>::forEachClass(std::function<void(size_t, size_t)> Fn) {
// Split sections into 256 shards and call Fn in parallel.
size_t NumShards = 256;
size_t Step = Sections.size() / NumShards;
- parallelFor(0, NumShards, [&](size_t I) {
+ parallelForEachN(0, NumShards, [&](size_t I) {
forEachClassRange(I * Step, (I + 1) * Step, Fn);
});
forEachClassRange(Step * NumShards, Sections.size(), Fn);
diff --git a/lld/ELF/MapFile.cpp b/lld/ELF/MapFile.cpp
index af5bc3c2c81..23c63e845c9 100644
--- a/lld/ELF/MapFile.cpp
+++ b/lld/ELF/MapFile.cpp
@@ -84,7 +84,7 @@ template <class ELFT>
DenseMap<DefinedRegular *, std::string>
getSymbolStrings(ArrayRef<DefinedRegular *> Syms) {
std::vector<std::string> Str(Syms.size());
- parallelFor(0, Syms.size(), [&](size_t I) {
+ parallelForEachN(0, Syms.size(), [&](size_t I) {
raw_string_ostream OS(Str[I]);
writeHeader<ELFT>(OS, Syms[I]->getVA(), Syms[I]->template getSize<ELFT>(),
0);
diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp
index b25aa068365..c5db01827e8 100644
--- a/lld/ELF/OutputSections.cpp
+++ b/lld/ELF/OutputSections.cpp
@@ -297,7 +297,7 @@ template <class ELFT> void OutputSection::writeTo(uint8_t *Buf) {
if (Filler)
fill(Buf, Sections.empty() ? Size : Sections[0]->OutSecOff, Filler);
- parallelFor(0, Sections.size(), [=](size_t I) {
+ parallelForEachN(0, Sections.size(), [=](size_t I) {
InputSection *Sec = Sections[I];
Sec->writeTo<ELFT>(Buf);
diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp
index a813d2f4097..b023aa84cb5 100644
--- a/lld/ELF/SyntheticSections.cpp
+++ b/lld/ELF/SyntheticSections.cpp
@@ -356,7 +356,7 @@ void BuildIdSection::computeHash(
std::vector<uint8_t> Hashes(Chunks.size() * HashSize);
// Compute hash values.
- parallelFor(0, Chunks.size(), [&](size_t I) {
+ parallelForEachN(0, Chunks.size(), [&](size_t I) {
HashFn(Hashes.data() + I * HashSize, Chunks[I]);
});
diff --git a/lld/ELF/Threads.h b/lld/ELF/Threads.h
index e6f680cef3b..ac7992e362c 100644
--- a/lld/ELF/Threads.h
+++ b/lld/ELF/Threads.h
@@ -76,8 +76,8 @@ void parallelForEach(IterTy Begin, IterTy End, FuncTy Fn) {
for_each(parallel::seq, Begin, End, Fn);
}
-inline void parallelFor(size_t Begin, size_t End,
- std::function<void(size_t)> Fn) {
+inline void parallelForEachN(size_t Begin, size_t End,
+ std::function<void(size_t)> Fn) {
if (Config->Threads)
for_each_n(parallel::par, Begin, End, Fn);
else
OpenPOWER on IntegriCloud