summaryrefslogtreecommitdiffstats
path: root/lld/ELF/ICF.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2016-12-03 21:24:51 +0000
committerRui Ueyama <ruiu@google.com>2016-12-03 21:24:51 +0000
commit244a435ae3ee07ad55576d78b5f5173616d15838 (patch)
tree6fa68e7b821e4f2fc18602e57e199425e9d04762 /lld/ELF/ICF.cpp
parent30545b9058824ffcfb14234d299a5f179a5feef7 (diff)
downloadbcm5719-llvm-244a435ae3ee07ad55576d78b5f5173616d15838.tar.gz
bcm5719-llvm-244a435ae3ee07ad55576d78b5f5173616d15838.zip
Factor out common code to a header.
llvm-svn: 288599
Diffstat (limited to 'lld/ELF/ICF.cpp')
-rw-r--r--lld/ELF/ICF.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/lld/ELF/ICF.cpp b/lld/ELF/ICF.cpp
index f2c240995b5..de6e4d3ce16 100644
--- a/lld/ELF/ICF.cpp
+++ b/lld/ELF/ICF.cpp
@@ -69,8 +69,8 @@
#include "ICF.h"
#include "Config.h"
#include "SymbolTable.h"
+#include "Threads.h"
-#include "lld/Core/Parallel.h"
#include "llvm/ADT/Hashing.h"
#include "llvm/Object/ELF.h"
#include "llvm/Support/ELF.h"
@@ -295,9 +295,8 @@ void ICF<ELFT>::forEachColor(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;
- parallel_for(size_t(0), NumShards, [&](size_t I) {
- forEachColorRange(I * Step, (I + 1) * Step, Fn);
- });
+ forLoop(0, NumShards,
+ [&](size_t I) { forEachColorRange(I * Step, (I + 1) * Step, Fn); });
forEachColorRange(Step * NumShards, Sections.size(), Fn);
}
OpenPOWER on IntegriCloud