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

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Tue May 9 14:58:32 PDT 2017


I mostly included those for api symmetry since I thought it helped
readability. I can remove if it doesn't help though
On Tue, May 9, 2017 at 2:17 PM Rui Ueyama via Phabricator <
reviews at reviews.llvm.org> wrote:

> 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
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170509/36067564/attachment.html>


More information about the llvm-commits mailing list