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

Thomas Rodgers rodgert@appliantology.com
Mon Sep 21 15:19:17 GMT 2020



> 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.


More information about the Libstdc++ mailing list