[PATCH] D33016: [Parallel] Add support for parallel execution policies to match C++ Parallelism TS

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 9 14:17:08 PDT 2017


ruiu added inline comments.


================
Comment at: lld/include/lld/Core/Parallel.h:32-33
+
+constexpr sequential_execution_policy seq{};
+constexpr parallel_execution_policy par{};
+
----------------
nit: do you need `{}`?


================
Comment at: lld/include/lld/Core/Parallel.h:176
+                "Invalid execution policy!");
+  detail::sequential_sort(Start, End, Comp);
+}
----------------
I think you can remove `detail::sequential_sort` and use `std::sort` instead.


================
Comment at: lld/include/lld/Core/Parallel.h:190
+                "Invalid execution policy!");
+  detail::sequential_for_each_n(Begin, End, Fn);
+}
----------------
This function is called once. You can remove the function and inline.


https://reviews.llvm.org/D33016





More information about the llvm-commits mailing list