diff options
| author | Michael Kruse <llvm-project@meinersbur.de> | 2025-01-03 10:22:51 +0100 |
|---|---|---|
| committer | Michael Kruse <llvm-project@meinersbur.de> | 2025-01-03 10:22:51 +0100 |
| commit | 38500d63e14ce340236840f60d356cdefb56a52c (patch) | |
| tree | 17edbec446ce9b50d2f215a483b83afb293a635d /llvm/lib/Support/BalancedPartitioning.cpp | |
| parent | 1a3d5daaef7a6a63448a497da3eff7fc9e23df26 (diff) | |
| parent | 27f30029741ecf023baece7b3dde1ff9011ffefc (diff) | |
Merge branch 'main' into users/meinersbur/flang_runtime_split-headersusers/meinersbur/flang_runtime_split-headers
Diffstat (limited to 'llvm/lib/Support/BalancedPartitioning.cpp')
| -rw-r--r-- | llvm/lib/Support/BalancedPartitioning.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/Support/BalancedPartitioning.cpp b/llvm/lib/Support/BalancedPartitioning.cpp index bc34b23f77cc..19977c57c08d 100644 --- a/llvm/lib/Support/BalancedPartitioning.cpp +++ b/llvm/lib/Support/BalancedPartitioning.cpp @@ -31,7 +31,7 @@ void BalancedPartitioning::BPThreadPool::async(Func &&F) { #if LLVM_ENABLE_THREADS // This new thread could spawn more threads, so mark it as active ++NumActiveThreads; - TheThreadPool.async([=]() { + TheThreadPool.async([this, F]() { // Run the task F(); @@ -93,7 +93,7 @@ void BalancedPartitioning::run(std::vector<BPFunctionNode> &Nodes) const { Nodes[I].InputOrderIndex = I; auto NodesRange = llvm::make_range(Nodes.begin(), Nodes.end()); - auto BisectTask = [=, &TP]() { + auto BisectTask = [this, NodesRange, &TP]() { bisect(NodesRange, /*RecDepth=*/0, /*RootBucket=*/1, /*Offset=*/0, TP); }; if (TP) { @@ -147,10 +147,11 @@ void BalancedPartitioning::bisect(const FunctionNodeRange Nodes, auto LeftNodes = llvm::make_range(Nodes.begin(), NodesMid); auto RightNodes = llvm::make_range(NodesMid, Nodes.end()); - auto LeftRecTask = [=, &TP]() { + auto LeftRecTask = [this, LeftNodes, RecDepth, LeftBucket, Offset, &TP]() { bisect(LeftNodes, RecDepth + 1, LeftBucket, Offset, TP); }; - auto RightRecTask = [=, &TP]() { + auto RightRecTask = [this, RightNodes, RecDepth, RightBucket, MidOffset, + &TP]() { bisect(RightNodes, RecDepth + 1, RightBucket, MidOffset, TP); }; |
