libstdc++: Improve simd fixed_size codegen
authorMatthias Kretz <m.kretz@gsi.de>
Thu, 24 Jun 2021 13:20:14 +0000 (14:20 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Thu, 24 Jun 2021 13:20:14 +0000 (14:20 +0100)
commit343f01f4cde17003b6721722361e190bd6cffd15
tree8341fe8a94a5fefef4ee3f552363b07326a92fcd
parentebb45cb816e3b808b29f05a934f6012a92d0c261
libstdc++: Improve simd fixed_size codegen

Sometimes fixed_size objects will get unnecessarily copied on the stack.
The simd implementation should never pass _SimdTuple by value to avoid
requiring the optimizer to see through these copies.

Signed-off-by: Matthias Kretz <m.kretz@gsi.de>
libstdc++-v3/ChangeLog:

* include/experimental/bits/simd_converter.h
(_SimdConverter::operator()): Pass _SimdTuple by const-ref.
* include/experimental/bits/simd_fixed_size.h
(_GLIBCXX_SIMD_FIXED_OP): Pass binary operator _SimdTuple
arguments by const-ref.
(_S_masked_unary): Pass _SimdTuple by const-ref.
libstdc++-v3/include/experimental/bits/simd_converter.h
libstdc++-v3/include/experimental/bits/simd_fixed_size.h