[PATCH] D117510: [Support] Simplify parallelForEach{,N}

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 24 08:43:43 PST 2022


rnk added inline comments.


================
Comment at: llvm/lib/Support/Parallel.cpp:198
+        for (size_t I = Begin, E = Begin + TaskSize; I != E; ++I)
+          Fn(I);
+      });
----------------
I believe the old code was templated in an effort to avoid having an indirect call in the inner loop. However, I don't think that actually matters. These constructs have so much overhead that they are only useful for coarse-grained parallelism, not vectorizable inner loops.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117510/new/

https://reviews.llvm.org/D117510



More information about the llvm-commits mailing list