[llvm] [Parallel] Revert sequential task changes (PR #109084)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 19 23:55:32 PDT 2024


================
@@ -217,13 +194,18 @@ TaskGroup::~TaskGroup() {
 void TaskGroup::spawn(std::function<void()> F, bool Sequential) {
 #if LLVM_ENABLE_THREADS
   if (Parallel) {
+    if (Sequential) {
+      // Act as worker thread 0.
+      threadIndex = 0;
----------------
MaskRay wrote:

Thanks. I just realized the flipped condition :) Adopted the style and kept the `threadIndex != UINT_MAX` assertion.

https://github.com/llvm/llvm-project/pull/109084


More information about the llvm-commits mailing list