Re: [RFC] c++: Print function template parms when relevant (was: [PATCH v4] c++: Add gnu::diagnose_as attribute)

2021-11-16 Thread Matthias Kretz
On Tuesday, 16 November 2021 21:25:33 CET Jason Merrill wrote: > On 11/8/21 15:00, Matthias Kretz wrote: > > I forgot to mention why I tagged it [RFC]: I needed one more bit of > > information on the template args TREE_VEC to encode > > EXPLICIT_TEMPLATE_ARGS_P. Its TREE

[PATCH 2/2] libstdc++: Use diagnose_as attribute to improve simd diagnostics

2021-11-15 Thread Matthias Kretz
Signed-off-by: Matthias Kretz libstdc++-v3/ChangeLog: * include/experimental/bits/simd.h: Diagnose 'std::experimental::parallelism_v2::simd_abi' as 'simd_abi'. On x86, diagnose _VecBuiltin<16>, _VecBuiltin<32>, and _VecBltnBtmsk<64>

[PATCH 1/2] libstdc++: Use diagnose_as attribute to improve string diagnostics

2021-11-15 Thread Matthias Kretz
This hides the basic_string template in all diagnostics, reducing the signal-to-noise ratio significantly. It also hides the std::__cxx11 namespace from users by presenting it as std. Signed-off-by: Matthias Kretz libstdc++-v3/ChangeLog: PR c++/89370 * include/bits/c++config

[PATCH 0/2] Make use of the diagnose_as attribute to improve libstdc++ diagnostics

2021-11-15 Thread Matthias Kretz
After my two C++ patches for template diagnostics and the diagnose_as attribute are in, I'd like to make use of the attribute for std::*string and std::pmr::*string as well as for std::experimental::simd diagnostics. Matthias Kretz (2): libstdc++: Use diagnose_as attribute to improve string

Re: [PATCH 11/11] libstdc++: Fix ODR issues with different -m flags

2021-11-15 Thread Matthias Kretz
ping. OK to push? On Tuesday, 8 June 2021 14:12:23 CET Matthias Kretz wrote: > From: Matthias Kretz > > Explicitly support use of the stdx::simd implementation in situations > where the user links TUs that were compiled with different -m flags. In > general, this is alway

[PATCH v5] c++: Add gnu::diagnose_as attribute

2021-11-14 Thread Matthias Kretz
wrote: > On 7/23/21 4:58 AM, Matthias Kretz wrote: > > gcc/cp/ChangeLog: > > PR c++/89370 > > * cp-tree.h: Add is_alias_template_p declaration. > > * decl2.c (is_alias_template_p): New function. Determines > > wheth

[PATCH v3] c-family: Add __builtin_assoc_barrier

2021-11-11 Thread Matthias Kretz
On Wednesday, 8 September 2021 15:49:27 CET Matthias Kretz wrote: > On Wednesday, 8 September 2021 15:44:28 CEST Jason Merrill wrote: > > On 9/8/21 5:37 AM, Matthias Kretz wrote: > > > On Tuesday, 7 September 2021 19:36:22 CEST Jason Merrill wrote: > > >>> case

Re: [RFC] c++: Print function template parms when relevant (was: [PATCH v4] c++: Add gnu::diagnose_as attribute)

2021-11-08 Thread Matthias Kretz
used the sign of that integer. I was hoping to find a cleaner solution, though. -Matthias On Monday, 8 November 2021 17:40:44 CET Matthias Kretz wrote: > On Tuesday, 17 August 2021 20:31:54 CET Jason Merrill wrote: > > > 2. Given a DECL_TI_ARGS tree, can I query whether

[RFC] c++: Print function template parms when relevant (was: [PATCH v4] c++: Add gnu::diagnose_as attribute)

2021-11-08 Thread Matthias Kretz
o understand. The general idea of this change is to print template parms wherever they would appear in the source code as well. Thus, the diagnostics code needs to know whether any template parameter was given explicitly. Signed-off-by: Matthias Kretz gcc/testsuite/ChangeLog

Re: [PATCH v2] c-family: Add __builtin_assoc_barrier

2021-09-08 Thread Matthias Kretz
On Wednesday, 8 September 2021 15:44:28 CEST Jason Merrill wrote: > On 9/8/21 5:37 AM, Matthias Kretz wrote: > > On Tuesday, 7 September 2021 19:36:22 CEST Jason Merrill wrote: > >>> case PAREN_EXPR: > >>> - RETURN (finish_parenthesize

Re: [PATCH v2] c-family: Add __builtin_assoc_barrier

2021-09-08 Thread Matthias Kretz
──── Dr. Matthias Kretz https://mattkretz.github.io GSI Helmholtz Centre for Heavy Ion Research https://gsi.de stdₓ::simd ── diff --git a/gcc/c-f

Re: [PATCH v2] c-family: Add __builtin_assoc_barrier

2021-09-06 Thread Matthias Kretz
On Monday, 6 September 2021 14:59:27 CEST Richard Biener wrote: > On Mon, 6 Sep 2021, Matthias Kretz wrote: > > On Monday, 6 September 2021 14:40:31 CEST Richard Biener wrote: > > > I'll note that currently a + PAREN_EXPR (b * c) is for example > > > also not co

Re: [PATCH v2] c-family: Add __builtin_assoc_barrier

2021-09-06 Thread Matthias Kretz
e (std::)fma (__builtin_fma) to explicitly request contraction. PAREN_EXPR seems like a good fit to inhibit contraction. -- ────── Dr. Matthias Kretz https://mattkretz.github.io GSI Helmholtz Ce

[PATCH v2] c-family: Add __builtin_assoc_barrier

2021-09-06 Thread Matthias Kretz
its operand instead. OK, that was easy. On Monday, 19 July 2021 14:34:12 CEST Richard Biener wrote: > On Mon, 19 Jul 2021, Matthias Kretz wrote: > > tested on x86_64-pc-linux-gnu with no new failures. OK for master? > > I think now that PAREN_EXPR can appear in C++ code you n

ping-3: [PATCH] c-family: Add more predefined macros for math flags

2021-07-27 Thread Matthias Kretz
OK? On Wednesday, 30 June 2021 10:59:28 CEST Matthias Kretz wrote: > Library code, especially in headers, sometimes needs to know how the > compiler interprets / optimizes floating-point types and operations. > This information can be used for additional optimizations or for &

[PATCH v4] c++: Add gnu::diagnose_as attribute

2021-07-23 Thread Matthias Kretz
-to-noise ratio due to the long namespaces involved. With the attribute, it is possible to solve PR89370 and make std::__cxx11::basic_string<_CharT, _Traits, _Alloc> appear as std::string in diagnostic output without extra hacks to recognize the type in the C++ frontend. Signed-off-by: Matthias

[PATCH] c-family: Add __builtin_assoc_barrier

2021-07-19 Thread Matthias Kretz
tested on x86_64-pc-linux-gnu with no new failures. OK for master? New builtin to enable explicit use of PAREN_EXPR in C & C++ code. Signed-off-by: Matthias Kretz gcc/testsuite/ChangeLog: * c-c++-common/builtin-assoc-barrier-1.c: New test. gcc/cp/ChangeLog: * cp-o

Re: [PATCH] c++: implement C++17 hardware interference size

2021-07-17 Thread Matthias Kretz
On Saturday, 17 July 2021 15:32:42 CEST Jonathan Wakely wrote: > On Sat, 17 Jul 2021, 09:15 Matthias Kretz, wrote: > > If somebody writes a library with `keep_apart` in the public API/ABI then > > you're right. > > Yes, it's fine if those constants don't affect a

Re: [PATCH] c++: implement C++17 hardware interference size

2021-07-17 Thread Matthias Kretz
On Friday, 16 July 2021 21:58:36 CEST Jonathan Wakely wrote: > On Fri, 16 Jul 2021 at 20:26, Matthias Kretz wrote: > > On Friday, 16 July 2021 18:54:30 CEST Jonathan Wakely wrote: > > > On Fri, 16 Jul 2021 at 16:33, Jason Merrill wrote: > > > > Adjusting them b

Re: [PATCH] c++: implement C++17 hardware interference size

2021-07-16 Thread Matthias Kretz
On Friday, 16 July 2021 19:20:29 CEST Noah Goldstein wrote: > On Fri, Jul 16, 2021 at 11:12 AM Matthias Kretz wrote: > > I don't understand how this feature would lead to false sharing. But maybe > > I > > misunderstand the spatial prefetcher. The first access to one

Re: [PATCH] c++: implement C++17 hardware interference size

2021-07-16 Thread Matthias Kretz
td::hardware_destructive_interference_size and std::hardware_constructive_interference_size turn into a glorified macro. -- ────── Dr. Matthias Kretz https://mattkretz.github.io GSI Helmholtz Centre

Re: [PATCH] c++: implement C++17 hardware interference size

2021-07-16 Thread Matthias Kretz
re interference size to 64 for all of x86 except -mtune=sandybridge. -- ── Dr. Matthias Kretz https://mattkretz.github.io GSI Helmholtz Centre for Heavy Ion Research https://gsi.de std::experimental::simd https://github.com/VcDevel/std-simd ──

Re: [RFC] c-family: Add __builtin_noassoc

2021-07-16 Thread Matthias Kretz
On Friday, 16 July 2021 11:31:29 CEST Richard Biener wrote: > On Fri, Jul 16, 2021 at 10:57 AM Matthias Kretz wrote: > > On Wednesday, 14 July 2021 10:14:55 CEST Richard Biener wrote: > > > I think implementing it similar to how we do __builtin_shufflevector > > > wou

[RFC] c-family: Add __builtin_noassoc

2021-07-16 Thread Matthias Kretz
? If you like it, I'll write the missing documentation and do real regression testing. --- New builtin to enable explicit use of PAREN_EXPR in C & C++ code. Signed-off-by: Matthias Kretz gcc/testsuite/ChangeLog: * c-c++-common/builtin-noassoc-1.c: New test. gcc/

Re: ping-2: [PATCH] c-family: Add more predefined macros for math flags

2021-07-16 Thread Matthias Kretz
On Wednesday, 14 July 2021 14:42:01 CEST H.J. Lu wrote: > On Wed, Jul 14, 2021 at 12:32 AM Matthias Kretz wrote: > > OK? > > > > On Wednesday, 30 June 2021 10:59:28 CEST Matthias Kretz wrote: > > > Library code, especially in headers, sometimes needs to know how

[PATCH v3] c++: Add gnu::diagnose_as attribute

2021-07-15 Thread Matthias Kretz
and the TYPE_DECL apparently doesn't have a template_info/decl at this point. From: Matthias Kretz This attribute overrides the diagnostics output string for the entity it appertains to. The motivation is to improve QoI for library TS implementations, where diagnostics have a very bad signal

ping-2: [PATCH] c-family: Add more predefined macros for math flags

2021-07-14 Thread Matthias Kretz
OK? On Wednesday, 30 June 2021 10:59:28 CEST Matthias Kretz wrote: > Library code, especially in headers, sometimes needs to know how the > compiler interprets / optimizes floating-point types and operations. > This information can be used for additional optimizations or for &

Re: [Questions] Is there any bit in gimple/rtl to indicate this IR support fast-math or not?

2021-07-14 Thread Matthias Kretz
s://godbolt.org/z/3cKq5hT1o -- ────── Dr. Matthias Kretz https://mattkretz.github.io GSI Helmholtz Centre for Heavy Ion Research https://gsi.de std::experimental::simd https://github.com/VcDevel/std-simd ──

Re: [PATCH] Add gnu::diagnose_as attribute

2021-07-07 Thread Matthias Kretz
: namespace [[whatever] foo {} namespace bar [[whatever]] = foo; -- ────── Dr. Matthias Kretz https://mattkretz.github.io GSI Helmholtz Centre for Heavy Ion Research https://gsi.d

ping: [PATCH] c-family: Add more predefined macros for math flags

2021-07-07 Thread Matthias Kretz
OK? (I want to use the macros in libstdc++.) On Wednesday, 30 June 2021 10:59:28 CEST Matthias Kretz wrote: > Library code, especially in headers, sometimes needs to know how the > compiler interprets / optimizes floating-point types and operations. > This information can be used for a

Re: [PATCH] Add gnu::diagnose_as attribute

2021-07-05 Thread Matthias Kretz
E is A0. I thus have no idea how to reject #2. -- ────── Dr. Matthias Kretz https://mattkretz.github.io GSI Helmholtz Centre for Heavy Ion Research https://gsi.de std::experimental::simd https://github.com/VcDevel/std-simd ──

Re: [PATCH] Add gnu::diagnose_as attribute

2021-07-01 Thread Matthias Kretz
On Tuesday, 22 June 2021 22:12:42 CEST Jason Merrill wrote: > On 6/22/21 4:01 PM, Matthias Kretz wrote: > > On Tuesday, 22 June 2021 21:52:16 CEST Jason Merrill wrote: > >> For alias templates, you probably want the attribute only on the > >> templated class, not on the

[PATCH] c-family: Add more predefined macros for math flags

2021-06-30 Thread Matthias Kretz
-math, -fassociative-math, and -frounding-math report their state via corresponding pre-defined macros. Signed-off-by: Matthias Kretz gcc/testsuite/ChangeLog: * gcc.dg/associative-math-1.c: New test. * gcc.dg/associative-math-2.c: New test. * gcc.dg/no-signed-zeros-1.c: New

Re: [PATCH 04/11 v3] libstdc++: Make use of __builtin_bit_cast

2021-06-24 Thread Matthias Kretz
For -ffast-math there was a missing using namespace __proposed left. The attached patch resolves the issue. From: Matthias Kretz The __bit_cast function was a hack to achieve what __builtin_bit_cast can do, therefore use __builtin_bit_cast if possible. However, __builtin_bit_cast cannot

Re: [PATCH] Add gnu::diagnose_as attribute

2021-06-22 Thread Matthias Kretz
atching template params? -Matthias -- ── Dr. Matthias Kretz https://mattkretz.github.io GSI Helmholtz Centre for Heavy Ion Research https://gsi.de std::experimental::simd

Re: [PATCH v2] libstdc++: Improve std::lock algorithm

2021-06-22 Thread Matthias Kretz
On Dienstag, 22. Juni 2021 17:20:41 CEST Jonathan Wakely wrote: > On Tue, 22 Jun 2021 at 14:21, Matthias Kretz wrote: > > This does a try_lock on all lockabes even if any of them fails. I think > > that's > > not only more expensive but also non-conforming. I think you need

Re: [PATCH v2] libstdc++: Improve std::lock algorithm

2021-06-22 Thread Matthias Kretz
lock()) > + { > + for (int __k = __j; __k != 0; --__k) > + __locks[(__first + __k - 1) % _Np].unlock(); > + __first = __idx; > + break; > + } > + } > +

Re: [committed] libstdc++: Improve std::lock algorithm

2021-06-22 Thread Matthias Kretz
_L3&... __l3) > { > - while (true) > -{ > - using __try_locker = __try_lock_impl<0, sizeof...(_L3) != 0>; > - unique_lock<_L1> __first(__l1); > - int __idx; > - auto __locks = std::tie(__l2, __l3...

Re: [PATCH] Add gnu::diagnose_as attribute

2021-06-22 Thread Matthias Kretz
the grammar rules, that'd help. :) Best, Matthias -- ── Dr. Matthias Kretz https://mattkretz.github.io GSI Helmholtz Centre for Heavy Ion Research https://gsi.de std::experimental::simd https://github.com/VcDevel/std-simd ──

Re: [PATCH] Add gnu::diagnose_as attribute

2021-06-15 Thread Matthias Kretz
On Tuesday, 15 June 2021 17:51:20 CEST Jason Merrill wrote: > On 6/11/21 6:01 AM, Matthias Kretz wrote: > > For reference I'll attach my stdx::simd diagnose_as patch. > > > > We could also talk about extending the feature to provide more information > > about the

Re: [PATCH 04/11 v2] libstdc++: Make use of __builtin_bit_cast

2021-06-11 Thread Matthias Kretz
While testing newer patches I found several missing conversions from __bit_cast to simd_bit_cast in this patch (i.e. where bit casting to / from fixed_size was sometimes required). Corrected patch attached. From: Matthias Kretz The __bit_cast function was a hack to achieve what

Re: [PATCH] Add gnu::diagnose_as attribute

2021-06-11 Thread Matthias Kretz
fiers > will just confuse users that don't know about them. > > If a user sees stdx::foo in a diagnostic and then tries to refer to > stdx::foo and gets an error, the diagnostic is not more helpful than one > that uses the fully qualified name. > > Jonathan, David, any thought

Re: [PATCH 11/11] libstdc++: Fix ODR issues with different -m flags

2021-06-09 Thread Matthias Kretz
On Wednesday, 9 June 2021 14:22:00 CEST Richard Biener wrote: > On Tue, Jun 8, 2021 at 2:23 PM Matthias Kretz wrote: > > From: Matthias Kretz > > > > Explicitly support use of the stdx::simd implementation in situations > > where the user links TUs that were compi

[PATCH 11/11] libstdc++: Fix ODR issues with different -m flags

2021-06-08 Thread Matthias Kretz
From: Matthias Kretz Explicitly support use of the stdx::simd implementation in situations where the user links TUs that were compiled with different -m flags. In general, this is always a (quasi) ODR violation for inline functions because at least codegen may differ in important ways. However

[PATCH 10/11] libstdc++: Fix internal names: add missing underscores

2021-06-08 Thread Matthias Kretz
From: Matthias Kretz Signed-off-by: Matthias Kretz libstdc++-v3/ChangeLog: * include/experimental/bits/simd_math.h (_GLIBCXX_SIMD_MATH_CALL2_): Rename arg2_ to __arg2. (_GLIBCXX_SIMD_MATH_CALL3_): Rename arg2_ to __arg2 and arg3_ to __arg3. --- libstdc++-v3

[PATCH 09/11] libstdc++: Ensure unrolled loops inline the lambda

2021-06-08 Thread Matthias Kretz
From: Matthias Kretz Signed-off-by: Matthias Kretz libstdc++-v3/ChangeLog: * include/experimental/bits/simd.h (__execute_on_index_sequence, __execute_on_index_sequence_with_return, __call_with_n_evaluations, __call_with_subscripts): Add flatten attribute

[PATCH 08/11] libstdc++: Avoid raising fp exceptions in trunc, floor, and ceil

2021-06-08 Thread Matthias Kretz
From: Matthias Kretz Signed-off-by: Matthias Kretz libstdc++-v3/ChangeLog: * include/experimental/bits/simd_x86.h (_S_trunc, _S_floor, _S_ceil): Set bit 8 (_MM_FROUND_NO_EXC) on AVX and SSE4.1 roundp[sd] calls. --- .../include/experimental/bits/simd_x86.h | 24

[PATCH 07/11] libstdc++: Fix condition when AVX512F ldexp implementation is used

2021-06-08 Thread Matthias Kretz
From: Matthias Kretz This improves codegen of ldexp if AVX512VL is available. Signed-off-by: Matthias Kretz libstdc++-v3/ChangeLog: * include/experimental/bits/simd_x86.h (_S_ldexp): The AVX512F implementation doesn't require a _VecBltnBtmsk ABI tag, it requires

[PATCH 06/11] libstdc++: Minor simd_math cleanups

2021-06-08 Thread Matthias Kretz
From: Matthias Kretz Signed-off-by: Matthias Kretz libstdc++-v3/ChangeLog: * include/experimental/bits/simd_math.h: Undefine internal macros after use. (frexp): Move #if to a more sensible position and reformat preceding code. (logb): Call _SimdImpl

[PATCH 05/11] libstdc++: Remove incorrect fabs overload

2021-06-08 Thread Matthias Kretz
From: Matthias Kretz fabs(int) returns double, this one didn't. This overload is not specified in the Parallelism TS 2. Also remove the comment about labs and llabs: it doesn't belong here. Signed-off-by: Matthias Kretz libstdc++-v3/ChangeLog: * include/experimental/bits

[PATCH 04/11] libstdc++: Make use of __builtin_bit_cast

2021-06-08 Thread Matthias Kretz
From: Matthias Kretz The __bit_cast function was a hack to achieve what __builtin_bit_cast can do, therefore use __builtin_bit_cast if possible. However, __builtin_bit_cast cannot be used to cast from/to fixed_size_simd, since it isn't trivially copyable (in the language sense — in principle

[PATCH 03/11] libstdc++: Improve fixed_size codegen

2021-06-08 Thread Matthias Kretz
From: Matthias Kretz 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 libstdc++-v3/ChangeLog: * include

[PATCH 02/11] libstdc++: Remove dead code

2021-06-08 Thread Matthias Kretz
From: Matthias Kretz This helper type became unused at some point. Signed-off-by: Matthias Kretz libstdc++-v3/ChangeLog: * include/experimental/bits/simd_fixed_size.h (_AbisInSimdTuple): Removed. --- .../experimental/bits/simd_fixed_size.h | 49 --- 1

[PATCH 01/11] libstdc++: Improve copysign codegen

2021-06-08 Thread Matthias Kretz
From: Matthias Kretz This also resolves a test failure on aarch64 with -ffast-math and fixed_size with large N. Signed-off-by: Matthias Kretz libstdc++-v3/ChangeLog: * include/experimental/bits/simd.h: Add missing operator~ overload for simd to __float_bitwise_operators

[PATCH 00/11] stdx::simd optimizations, corrections, and cleanups

2021-06-08 Thread Matthias Kretz
flags. Matthias Kretz (11): libstdc++: Improve copysign codegen libstdc++: Remove dead code libstdc++: Improve fixed_size codegen libstdc++: Make use of __builtin_bit_cast libstdc++: Remove incorrect fabs overload libstdc++: Minor simd_math cleanups libstdc++: Fix condition when

[PATCH 3/3] libstdc++: Document simd testsuite

2021-06-08 Thread Matthias Kretz
libstdc++-v3/ChangeLog: * testsuite/experimental/simd/README.md: New file. Signed-off-by: Matthias Kretz --- .../testsuite/experimental/simd/README.md | 257 ++ 1 file changed, 257 insertions(+) create mode 100644 libstdc++-v3/testsuite/experimental/simd

[PATCH 2/3] libstdc++: Improve output verbosity options and default

2021-06-08 Thread Matthias Kretz
help target for changes to DRIVEROPTS. Signed-off-by: Matthias Kretz --- .../testsuite/experimental/simd/driver.sh | 137 +- .../experimental/simd/generate_makefile.sh| 33 +++-- 2 files changed, 121 insertions(+), 49 deletions

[PATCH 1/3] libstdc++: Remove -fno-tree-vrp after PR98834 was resolved

2021-06-08 Thread Matthias Kretz
libstdc++-v3/ChangeLog: * testsuite/Makefile.am (check-simd): Remove -fno-tree-vrp flag and associated warning. * testsuite/Makefile.in: Regenerate. Signed-off-by: Matthias Kretz --- libstdc++-v3/testsuite/Makefile.am | 3 +-- libstdc++-v3/testsuite/Makefile.in | 3

[PATCH 0/3] Improve and document stdx::simd testsuite

2021-06-08 Thread Matthias Kretz
. Tested on x86_64-linux (and more). Matthias Kretz (3): libstdc++: Remove -fno-tree-vrp after PR98834 was resolved libstdc++: Improve output verbosity options and default libstdc++: Document simd testsuite libstdc++-v3/testsuite/Makefile.am| 3 +- libstdc++-v3/testsuite

Re: [PATCH] Add gnu::diagnose_as attribute

2021-06-01 Thread Matthias Kretz
On Tuesday, 1 June 2021 21:12:18 CEST Jason Merrill wrote: > On 5/28/21 3:42 AM, Matthias Kretz wrote: > > On Friday, 28 May 2021 05:05:52 CEST Jason Merrill wrote: > >> I'd think you could get the same effect from a hypothetical > >> > >> namespace [[gnu::di

Re: [PATCH] Add gnu::diagnose_as attribute

2021-05-28 Thread Matthias Kretz
On Friday, 28 May 2021 05:05:52 CEST Jason Merrill wrote: > On 5/27/21 6:07 PM, Matthias Kretz wrote: > > On Thursday, 27 May 2021 23:15:46 CEST Jason Merrill wrote: > >> On 5/27/21 2:54 PM, Matthias Kretz wrote: > >>> namespace Vir { > >>>

Re: [PATCH] Add gnu::diagnose_as attribute

2021-05-27 Thread Matthias Kretz
On Thursday, 27 May 2021 23:15:46 CEST Jason Merrill wrote: > On 5/27/21 2:54 PM, Matthias Kretz wrote: > > Also hiding all inline namespace by default might make some error messages > > harder to understand: > > > > namespace Vir { > >inlin

Re: [PATCH] Add gnu::diagnose_as attribute

2021-05-27 Thread Matthias Kretz
On Thursday, 27 May 2021 19:39:48 CEST Jason Merrill wrote: > On 5/4/21 7:13 AM, Matthias Kretz wrote: > > From: Matthias Kretz > > > > This attribute overrides the diagnostics output string for the entity it > > appertains to. The motivation is to improve QoI for lib

Re: [PATCH] c++: Add missing scope in typedef diagnostic [PR100763]

2021-05-27 Thread Dr. Matthias Kretz
On Thursday, 27 May 2021 17:18:58 CEST Jason Merrill wrote: > On 5/26/21 5:27 PM, Matthias Kretz wrote: > > From: Matthias Kretz > > > > dump_type on 'const std::string' should not print 'const string' unless > > TFF_UNQUALIFIED_NAME is requested. > > > >

Re: [PATCH] c++: Output less irrelevant info for function template decl [PR100716]

2021-05-27 Thread Matthias Kretz
On Thursday, 27 May 2021 17:07:40 CEST Jason Merrill wrote: > On 5/26/21 5:29 PM, Matthias Kretz wrote: > > New revision which can also be compiled with GCC 4.8. > > > > From: Matthias Kretz > > > > Ensure dump_template_decl for function templates never pri

Re: [PATCH] Add gnu::diagnose_as attribute

2021-05-26 Thread Matthias Kretz
tiation. Example: template struct X {}; using [[gnu::diagnose_as("XX")]] XX = X; // OK template struct X; using [[gnu::diagnose_as("XY")]] XY = X; // not OK msgid "ignoring %qE attribute applied to template %qT after instantiation" OK? > > + error ("%qE

Re: [PATCH] c++: Output less irrelevant info for function template decl [PR100716]

2021-05-26 Thread Matthias Kretz
New revision which can also be compiled with GCC 4.8. From: Matthias Kretz Ensure dump_template_decl for function templates never prints template parameters after the function name (it did with -fno-pretty-templates) and skip output of irrelevant & confusing "[with T = T]" in dum

[PATCH] c++: Add missing scope in typedef diagnostic [PR100763]

2021-05-26 Thread Matthias Kretz
From: Matthias Kretz dump_type on 'const std::string' should not print 'const string' unless TFF_UNQUALIFIED_NAME is requested. gcc/cp/ChangeLog: PR c++/100763 * error.c: Call dump_scope when printing a typedef. --- gcc/cp/error.c | 2 ++ 1 file changed, 2 insertions

[PATCH] c++: Output less irrelevant info for function template decl [PR100716]

2021-05-25 Thread Matthias Kretz
From: Matthias Kretz Ensure dump_template_decl for function templates never prints template parameters after the function name (it did with -fno-pretty-templates) and skip output of irrelevant & confusing "[with T = T]" in dump_substitution. gcc/cp/ChangeLog:

Re: [PATCH] Add gnu::diagnose_as attribute

2021-05-04 Thread Matthias Kretz
ee_identifier (pp, TYPE_IDENTIFIER (t)); This is important for my diagnose_as patch because otherwise the output is: 'const string' {aka 'const std::string'} which is confusing and unnecessarily verbose. Patch below. From: Matthias Kretz dump_type on 'const std::string' should not print 'cons

Re: [PATCH] Add gnu::diagnose_as attribute

2021-05-04 Thread Matthias Kretz
On Tuesday, 4 May 2021 16:23:23 CEST Matthias Kretz wrote: > On Tuesday, 4 May 2021 15:34:13 CEST David Malcolm wrote: > > Does the patch interact correctly with the %H and %I codes that try to > > show the differences between two template types? > > I don't know. I'll tr

Re: [PATCH] Add gnu::diagnose_as attribute

2021-05-04 Thread Matthias Kretz
On Tuesday, 4 May 2021 15:34:13 CEST David Malcolm wrote: > On Tue, 2021-05-04 at 13:13 +0200, Matthias Kretz wrote: > > This attribute overrides the diagnostics output string for the entity > > it > > appertains to. The motivation is to improve QoI for library TS >

[PATCH] Add gnu::diagnose_as attribute

2021-05-04 Thread Matthias Kretz
From: Matthias Kretz This attribute overrides the diagnostics output string for the entity it appertains to. The motivation is to improve QoI for library TS implementations, where diagnostics have a very bad signal-to-noise ratio due to the long namespaces involved. On Tuesday, 27 April 2021 11

Re: [PATCH 4/4] libstdc++: More efficient last day of month.

2021-02-23 Thread Matthias Kretz
ggle the last bit. -- ────── Dr. Matthias Kretz https://mattkretz.github.io GSI Helmholtz Centre for Heavy Ion Research https://gsi.de std::experimental::simd https://github.com/VcDevel/std-simd ──

Re: [PATCH] libstdc++: Don't use reserved identifiers in simd headers

2021-02-01 Thread Matthias Kretz
't have it, the simd headers probably shouldn't have it either. Best, Matthias -- ────── Dr. Matthias Kretz https://mattkretz.github.io GSI Helmholtz Centre for Heavy Ion Research https://

Re: [PATCH 14/16] Implement hmin and hmax

2021-02-01 Thread Matthias Kretz
On Mittwoch, 27. Januar 2021 21:42:50 CET Matthias Kretz wrote: > --- a/libstdc++-v3/include/experimental/bits/simd.h > +++ b/libstdc++-v3/include/experimental/bits/simd.h > @@ -204,6 +204,27 @@ template > template >using _SizeConstant = integral_constant; > >

[PATCH 16/16] Improve "find_first/last_set" for NEON

2021-01-27 Thread Matthias Kretz
_asint, __zero)[0]; +#endif } else __assert_unreachable<_Tp>(); -- ────── Dr. Matthias Kretz https://mattkretz.github.io GSI Helmholtz Centre for Heavy Ion Research

[PATCH 15/16] Work around test failures using -mno-tree-vrp

2021-01-27 Thread Matthias Kretz
From: Matthias Kretz This is necessary to avoid failures resulting from PR98834. libstdc++-v3/ChangeLog: * testsuite/Makefile.am: Warn about the workaround. Add -fno-tree-vrp to CXXFLAGS passed to the check_simd script. Improve initial user feedback from make check-simd

[PATCH 14/16] Implement hmin and hmax

2021-01-27 Thread Matthias Kretz
From: Matthias Kretz From 9.7.4 in Parallelism TS 2. For some reason I overlooked these two functions. Implement them via call to _S_reduce. libstdc++-v3/ChangeLog: * include/experimental/bits/simd.h: Add __detail::_Minimum and __detail::_Maximum to use them as _BinaryOperation

[PATCH 13/16] Improve test codegen for interpreting assembly

2021-01-27 Thread Matthias Kretz
From: Matthias Kretz In many failure cases it is helpful to inspect the instructions leading up to the test failure. After this change the location is easier to find and the branch after failure is easier to find. libstdc++-v3/ChangeLog: * testsuite/experimental/simd/tests/bits/verify.h

[PATCH 12/16] Support timeout and timeout-factor options

2021-01-27 Thread Matthias Kretz
From: Matthias Kretz libstdc++-v3/ChangeLog: * testsuite/experimental/simd/driver.sh: Abstract reading test options into read_src_option function. Read skip, only, expensive, and xfail via read_src_option. Add timeout and timeout-factor options and adjust timeout

[PATCH 11/16] Abort test after 1000 lines of output

2021-01-27 Thread Matthias Kretz
From: Matthias Kretz Handle overly large output by aborting the log and thus the test. This is a similar condition to a timeout. libstdc++-v3/ChangeLog: * testsuite/experimental/simd/driver.sh: When handling the pipe to log (and on verbose to stdout) count the lines

[PATCH 10/16] Skip testing hypot3 for long double on PPC

2021-01-27 Thread Matthias Kretz
From: Matthias Kretz std::hypot(a, b, c) is imprecise and makes this test fail even though the failure is unrelated to simd. libstdc++-v3/ChangeLog: * testsuite/experimental/simd/tests/hypot3_fma.cc: Add skip: markup for long double on powerpc64*. --- libstdc++-v3/testsuite

[PATCH 09/16] Fix mask reduction of simd_mask on POWER7

2021-01-27 Thread Matthias Kretz
From: Matthias Kretz POWER7 does not support __vector long long reductions, making the generic _S_popcount implementation ill-formed. Specializing _S_popcount for PPC allows optimization and avoids the issue. libstdc++-v3/ChangeLog: * include/experimental/bits/simd.h: Add

[PATCH 08/16] Immediate feedback with -v

2021-01-27 Thread Matthias Kretz
From: Matthias Kretz libstdc++-v3/ChangeLog: * testsuite/experimental/simd/driver.sh: Remove executable on SIGINT. Process compiler and test executable output: In verbose mode print messages immediately, limited to 1000 lines and breaking long lines to below

[PATCH 07/16] Fix incorrect display of old test summaries

2021-01-27 Thread Matthias Kretz
From: Matthias Kretz libstdc++-v3/ChangeLog: * testsuite/Makefile.am: Ensure .simd.summary is empty before collecting a new summary. * testsuite/Makefile.in: Regenerate. --- libstdc++-v3/testsuite/Makefile.am | 1 + libstdc++-v3/testsuite/Makefile.in | 1 + 2 files

[PATCH 05/16] Fix several check-simd interaction issues

2021-01-27 Thread Matthias Kretz
From: Matthias Kretz libstdc++-v3/ChangeLog: * testsuite/experimental/simd/driver.sh (verify_test): Print test output on run xfail. Do not repeat lines from the log that were already printed on stdout. (test_selector): Make the compiler flags pattern usable

[PATCH 04/16] Fix simd_mask on POWER w/o POWER8

2021-01-27 Thread Matthias Kretz
From: Matthias Kretz libstdc++-v3/ChangeLog: * include/experimental/bits/simd.h: Remove unnecessary static assertion. Allow sizeof(8) integer __intrinsic_type to enable the necessary mask type. --- libstdc++-v3/include/experimental/bits/simd.h | 6 -- 1 file changed

[PATCH 06/16] Fix DRIVEROPTS and TESTFLAGS processing

2021-01-27 Thread Matthias Kretz
From: Matthias Kretz libstdc++-v3/ChangeLog: * testsuite/experimental/simd/generate_makefile.sh: Use different variables internally than documented for user overrides. This makes internal append/prepend work as intended. --- .../testsuite/experimental/simd

[PATCH 03/16] Support -mlong-double-64 on PPC

2021-01-27 Thread Matthias Kretz
From: Matthias Kretz libstdc++-v3/ChangeLog: * include/experimental/bits/simd.h: Let __intrinsic_type be valid if sizeof(long double) == sizeof(double) and use a __vector double as member type. --- libstdc++-v3/include/experimental/bits/simd.h | 11 --- 1 file changed, 8

[PATCH 02/16] Fix NEON intrinsic types usage

2021-01-27 Thread Matthias Kretz
From: Matthias Kretz Intrinsics types for NEON differ from gnu::vector_size types now. This requires explicit specializations for __intrinsic_type and a new __is_intrinsic_type trait. libstdc++-v3/ChangeLog: * include/experimental/bits/simd.h (__is_intrinsic_type): New internal

[PATCH 01/16] Support skip, only, expensive, and xfail markers

2021-01-27 Thread Matthias Kretz
From: Matthias Kretz libstdc++-v3/ChangeLog: * testsuite/experimental/simd/driver.sh: Implement skip, only, expensive, and xfail markers. They can select on type, ABI tag subset number, target-triplet, and compiler flags. * testsuite/experimental/simd

[PATCH 00/16] stdx::simd fixes and testsuite improvements

2021-01-27 Thread Matthias Kretz
As promised on IRC ... Matthias Kretz (15): Support skip, only, expensive, and xfail markers Fix NEON intrinsic types usage Support -mlong-double-64 on PPC Fix simd_mask on POWER w/o POWER8 Fix several check-simd interaction issues Fix DRIVEROPTS and TESTFLAGS processing Fix

Re: [PATCH] Add simd testsuite

2020-12-18 Thread Matthias Kretz
On Donnerstag, 17. Dezember 2020 14:10:51 CET Jonathan Wakely wrote: > On 16/12/20 12:58 +0100, Matthias Kretz wrote: > >+ $srcdir/testsuite/experimental/simd/generate_makefile.sh \ > >+--destination="$testdir/$subdir" $CXX $INCLUDES $CXXFLAGS -static > > Is th

Re: [PATCH] std::experimental::simd

2020-11-13 Thread Matthias Kretz
On Donnerstag, 12. November 2020 00:43:31 CET Jonathan Wakely wrote: > On 08/05/20 21:03 +0200, Matthias Kretz wrote: > >Here's my last update to the std::experimental::simd patch. It's currently > >based on the gcc-10 branch. > > > > > >+ > >+// __next

Re: [PATCH] Let numeric_limits::is_iec559 reflect -ffast-math

2020-05-25 Thread Matthias Kretz
On Freitag, 22. Mai 2020 18:39:42 CEST Jonathan Wakely wrote: > On 22/05/20 09:49 +0200, Matthias Kretz wrote: > >On Donnerstag, 21. Mai 2020 17:46:01 CEST Marc Glisse wrote: > >> On Thu, 21 May 2020, Jonathan Wakely wrote: > >> > On 27/04/20 17:09 +0200, Matt

Re: [PATCH] Let numeric_limits::is_iec559 reflect -ffast-math

2020-05-22 Thread Matthias Kretz
On Donnerstag, 21. Mai 2020 17:46:01 CEST Marc Glisse wrote: > On Thu, 21 May 2020, Jonathan Wakely wrote: > > On 27/04/20 17:09 +0200, Matthias Kretz wrote: > >> From: Matthias Kretz > >> > >>PR libstdc++/84949 > >>* incl

Re: [RFC] Clarify -ffinite-math-only documentation

2020-04-28 Thread Matthias Kretz
On Dienstag, 28. April 2020 09:21:38 CEST Richard Biener wrote: > On Mon, Apr 27, 2020 at 11:26 PM Matthias Kretz wrote: > > On Montag, 27. April 2020 21:39:17 CEST Richard Sandiford wrote: > > > "Dr. Matthias Kretz" writes: > > > > On Montag, 27. April 20

Re: [RFC] Clarify -ffinite-math-only documentation

2020-04-27 Thread Matthias Kretz
On Montag, 27. April 2020 21:39:17 CEST Richard Sandiford wrote: > "Dr. Matthias Kretz" writes: > > On Montag, 27. April 2020 18:59:08 CEST Richard Sandiford wrote: > >> Richard Biener via Gcc-patches writes: > >> > On Mon, Apr 27, 2020 at 6

Re: [RFC] Clarify -ffinite-math-only documentation

2020-04-27 Thread Dr. Matthias Kretz
On Montag, 27. April 2020 18:59:08 CEST Richard Sandiford wrote: > Richard Biener via Gcc-patches writes: > > On Mon, Apr 27, 2020 at 6:09 PM Matthias Kretz wrote: > >> Hi, > >> > >> This documentation change clarifies the effect of -ffinite-math-only.

<    1   2   3   >