[PATCH] libstdc++: Rebase include/pstl to current upstream

Jonathan Wakely jwakely@redhat.com
Mon Sep 21 16:16:17 GMT 2020


On 21/09/20 08:19 -0700, Thomas Rodgers wrote:
>
>
>> On Sep 21, 2020, at 7:40 AM, Jonathan Wakely <jwakely@redhat.com> wrote:
>>
>> On 15/09/20 20:35 -0700, Thomas Rodgers wrote:
>>> From: Thomas Rodgers <trodgers@redhat.com>
>>>
>>> From llvm-project/pstl @ 0b2e0e80d96
>>>
>>> libstdc++-v3/ChangeLog:
>>>
>>> 	* include/pstl/algorithm_impl.h: Update file.
>>> 	* include/pstl/execution_impl.h: Likewise.
>>> 	* include/pstl/glue_algorithm_impl.h: Likewise.
>>> 	* include/pstl/glue_memory_impl.h: Likewise.
>>> 	* include/pstl/glue_numeric_impl.h: Likewise.
>>> 	* include/pstl/memory_impl.h: Likewise.
>>> 	* include/pstl/numeric_impl.h: Likewise.
>>> 	* include/pstl/parallel_backend.h: Likewise.
>>> 	* include/pstl/parallel_backend_serial.h: Likewise.
>>> 	* include/pstl/parallel_backend_tbb.h: Likewise.
>>> 	* include/pstl/parallel_backend_utils.h: Likewise.
>>> 	* include/pstl/pstl_config.h: Likewise.
>>> 	* include/pstl/unseq_backend_simd.h: Likewise.
>>> ---
>>> libstdc++-v3/include/pstl/algorithm_impl.h    | 181 ++--
>>> libstdc++-v3/include/pstl/execution_impl.h    |   4 +-
>>> .../include/pstl/glue_algorithm_impl.h        | 543 +++++------
>>> libstdc++-v3/include/pstl/glue_memory_impl.h  | 264 ++---
>>> libstdc++-v3/include/pstl/glue_numeric_impl.h |  68 +-
>>> libstdc++-v3/include/pstl/memory_impl.h       |  67 +-
>>> libstdc++-v3/include/pstl/numeric_impl.h      |   8 +-
>>> libstdc++-v3/include/pstl/parallel_backend.h  |   8 +
>>> .../include/pstl/parallel_backend_serial.h    |   8 +-
>>> .../include/pstl/parallel_backend_tbb.h       | 903 +++++++++++++++---
>>> .../include/pstl/parallel_backend_utils.h     | 248 +++--
>>> libstdc++-v3/include/pstl/pstl_config.h       |  24 +-
>>> .../include/pstl/unseq_backend_simd.h         |  39 +-
>>> 13 files changed, 1586 insertions(+), 779 deletions(-)
>>>
>>> diff --git a/libstdc++-v3/include/pstl/glue_algorithm_impl.h b/libstdc++-v3/include/pstl/glue_algorithm_impl.h
>>> index 379de4033ec..d2e30529f78 100644
>>> --- a/libstdc++-v3/include/pstl/glue_algorithm_impl.h
>>> +++ b/libstdc++-v3/include/pstl/glue_algorithm_impl.h
>>> @@ -757,8 +743,7 @@ __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool>
>>> equal(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
>>>      _ForwardIterator2 __last2)
>>> {
>>> -    return std::equal(std::forward<_ExecutionPolicy>(__exec), __first1, __last1, __first2, __last2,
>>> -                      __pstl::__internal::__pstl_equal());
>>> +    return equal(std::forward<_ExecutionPolicy>(__exec), __first1, __last1, __first2, __last2, std::equal_to<>());
>>
>> Any idea why this is now called unqualified? I don't think we want ADL
>> here.
>>
>I’m sure it is related to ...
>>
>>> diff --git a/libstdc++-v3/include/pstl/parallel_backend_tbb.h b/libstdc++-v3/include/pstl/parallel_backend_tbb.h
>>> index 9c05ade0532..4476486d548 100644
>>> --- a/libstdc++-v3/include/pstl/parallel_backend_tbb.h
>>> +++ b/libstdc++-v3/include/pstl/parallel_backend_tbb.h
>>
>> This file is full of non-reserved names, like _root and _x_orig and
>> move_y_range.
>>
>
>The upstream authors not being sufficiently versed in thinking in terms of writing things up front to avoid the sort of issues that a stdlib requires of the code.
>
>> Fixing those upstream might take a while though.
>
>I have already started accumulating a set of patches for upstream which I’ll manage as independently of getting this rebase into gcc.

Here's a patch to fix
https://bugs.llvm.org/show_bug.cgi?id=47601
and
https://bugs.llvm.org/show_bug.cgi?id=47601
by essentially rewriting the entire file!


-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 6198 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20200921/3e61d68f/attachment-0001.bin>


More information about the Gcc-patches mailing list