aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-profdata/llvm-profdata.cpp
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@centrum.cz>2022-04-05 21:27:14 +0200
committerLuboš Luňák <l.lunak@centrum.cz>2022-05-04 06:16:55 +0200
commit8ef5710e6303904dc9a99019bf9b1a8353397f0c (patch)
tree0ddf6440db42fd59e4f06f86aca4400a1871e806 /llvm/tools/llvm-profdata/llvm-profdata.cpp
parent764676b737db0f259ef018104edbc2aec9db7e7d (diff)
downloadllvm-8ef5710e6303904dc9a99019bf9b1a8353397f0c.zip
llvm-8ef5710e6303904dc9a99019bf9b1a8353397f0c.tar.gz
llvm-8ef5710e6303904dc9a99019bf9b1a8353397f0c.tar.bz2
[ThreadPool] add ability to group tasks into separate groups
This is needed for parallelizing of loading modules symbols in LLDB (D122975). Currently LLDB can parallelize indexing symbols when loading a module, but modules are loaded sequentially. If LLDB index cache is enabled, this means that the cache loading is not parallelized, even though it could. However doing that creates a threadpool-within-threadpool situation, so the number of threads would not be properly limited. This change adds ThreadPoolTaskGroup as a simple type that can be used with ThreadPool calls to put tasks into groups that can be independently waited for (even recursively from within a task) but still run in the same thread pool. Differential Revision: https://reviews.llvm.org/D123225
Diffstat (limited to 'llvm/tools/llvm-profdata/llvm-profdata.cpp')
-rw-r--r--llvm/tools/llvm-profdata/llvm-profdata.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/tools/llvm-profdata/llvm-profdata.cpp b/llvm/tools/llvm-profdata/llvm-profdata.cpp
index ce5f0a8..aea6088 100644
--- a/llvm/tools/llvm-profdata/llvm-profdata.cpp
+++ b/llvm/tools/llvm-profdata/llvm-profdata.cpp
@@ -38,6 +38,7 @@
#include "llvm/Support/WithColor.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
+#include <queue>
using namespace llvm;