Re: [PATCH] c++/modules: Stream some missing lang_type flags

2025-07-25 Thread Nathaniel Shead
On Fri, Jul 25, 2025 at 08:58:47AM -0400, Patrick Palka wrote: > On Fri, 25 Jul 2025, Nathaniel Shead wrote: > > > Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? > > > > -- >8 -- > > > > I noticed that C++26 trivial relocation didn't work in modules yet, and > > there are a cou

Re: [PATCH] [RFC] Delayed parsing for bounds safety attributes

2025-07-25 Thread Andrew Pinski
On Fri, Jul 25, 2025 at 8:50 PM Bill Wendling wrote: > > On Thu, Jul 24, 2025 at 3:20 PM Martin Uecker wrote: > > Am Donnerstag, dem 24.07.2025 um 15:06 -0700 schrieb Bill Wendling: > > > > constexpr size_t size = 4; > > > > struct foo { > > > > char (*buf)[size] __counted_by(size); // two diff

Re: [PATCH] [15 backport] [RISC-V] Correct CFA notes for stack-clash protection [PR120714]

2025-07-25 Thread Jeff Law
On 7/24/25 1:53 AM, Andreas Schwab wrote: From: Alexey Merzlyakov Fixes incorrect SP-addresses used in CFA notes for the stack probes unrelative to the frame's top. It applied to the RISC-V targets code generation when the stack-clash protection is enabled. PR target/120714 gcc/Chan

[PATCH] Improve mergability of CSWTCH [PR120523]

2025-07-25 Thread Andrew Pinski
When I did r16-1067-gaa935ce40a7, I thought it would be enough to mark the decl as mergable to get it to merge on all targets. Turns out a few things needed to be changed to support it being mergable on all targets. The first thing is improve the selecting of the mergable section and instead of bas

Re: [PATCH] [RFC] Delayed parsing for bounds safety attributes

2025-07-25 Thread Bill Wendling
On Thu, Jul 24, 2025 at 3:20 PM Martin Uecker wrote: > Am Donnerstag, dem 24.07.2025 um 15:06 -0700 schrieb Bill Wendling: > > > constexpr size_t size = 4; > > > struct foo { > > > char (*buf)[size] __counted_by(size); // two different "size"! > > > int size; > > > }; > > > > VLAs within struc

Re: [PATCH] [RFC] Delayed parsing for bounds safety attributes

2025-07-25 Thread Bill Wendling
On Thu, Jul 24, 2025 at 2:53 PM Martin Uecker wrote: > Am Donnerstag, dem 24.07.2025 um 14:25 -0700 schrieb Bill Wendling: > > On Thu, Jul 24, 2025 at 8:03 AM Martin Uecker wrote: > > > Am Donnerstag, dem 24.07.2025 um 14:08 + schrieb Aaron Ballman: > > > > On Wed, Jul 23, 2025 at 8:38 PM Mar

[PATCH] c++: extract_call_expr and C++20 rewritten cmp ops

2025-07-25 Thread Patrick Palka
After r16-2519-gba5a6787374dea, we should never see a C++20 rewritten comparison operator expressed as a built-in acting on an operator<=> call, e.g. operator<=>(x, y) < 0. This is because operator<=> always returns a class type (std::strong/weak/partial_ordering), so the < will necessarily resolv

Re: [PATCH] c++: extract_call_expr and C++20 rewritten cmp ops

2025-07-25 Thread Patrick Palka
On Fri, 25 Jul 2025, Patrick Palka wrote: > After r16-2519-gba5a6787374dea, we should never see a C++20 rewritten > comparison operator expressed as a built-in acting on an operator<=> > call, e.g. operator<=>(x, y) < 0. This is because operator<=> always > returns a class type (std::strong/wea

[PATCH 04/34] diagnostics: move diagnostic_diagram to diagnostics::diagram

2025-07-25 Thread David Malcolm
No functional change intended. gcc/analyzer/ChangeLog: * bounds-checking.cc: Update #include for move of "diagnostic-diagram.h" to "diagnostics/diagram.h". Update for move of diagnostic_diagram to diagnostics::diagram. gcc/ChangeLog: * diagnostic-format-html.cc: Up

[PATCH 01/34] diagnostics: introduce a "gcc/diagnostics" subdirectory

2025-07-25 Thread David Malcolm
The "gcc" subdirectory of our source tree currently contains a total of almost 1000 .cc and .h files, enough to hit rate-limiting in some git web UIs, and obscuring the logical relationships between subsystems. In r16-2211-ga5d9debedd2f46 I started introducing a "namespace diagnostics" so it makes

[PATCH 05/34] diagnostics: move edit_context to namespace/dir "diagnostics"

2025-07-25 Thread David Malcolm
No functional change intended. gcc/ChangeLog: * Makefile.in (OBJS-libcommon): Replace edit-context.o with diagnostics/edit-context.o. * diagnostic-format-html.cc: Update #include for move of edit-context.h to diagnostics subdir. * diagnostic.cc: Likewise. U

Re: [PATCH] x86: Disallow -mtls-dialect=gnu with no_caller_saved_registers

2025-07-25 Thread Uros Bizjak
On Thu, Jul 24, 2025 at 9:30 PM H.J. Lu wrote: > > On x86-64, __tls_get_addr is a normal function which doesn't preserve > vector registers. On i386, ___tls_get_addr preserve vector registers > only with the commit: Can you please rephrase the above part? What does it mean to be a normal functio

Re: [PATCH] Remove STMT_VINFO_VEC_STMTS

2025-07-25 Thread Richard Sandiford
Richard Biener writes: > The following removes the last uses of STMT_VINFO_VEC_STMTS and > the vector itself. Vector stmts are recorded in SLP nodes now. > > The last use is a bit strange - it was introduced by > Richard S. in r8-6064-ga57776a1136962 and affects only > power7 and below (the re-al

[PATCH] RISC-V: Remove user-level interrupts

2025-07-25 Thread Christoph Müllner
There was once a RISC-V extension draft ("N"), which introduced user-level interrupts. However, it was never ratified and the specification draft has been removed from the RISC-V ISA manual in commit `b6cade07034` with the comment "it'll likely need to be redesigned". Support for a N extension ne

Re: [PATCH 4/4] Do not set STMT_VINFO_VECTYPE from dataref analysis

2025-07-25 Thread Richard Biener
On Fri, 25 Jul 2025, Robin Dapp wrote: > > It's probably changes from the RVV cost modeling behavior, the patches > > are of course not supposed to change code generation. > > Looks like a proper corner case... > From what I can see the difference to before is that we now always call > > get_rel

Re: [PATCH 4/4] Do not set STMT_VINFO_VECTYPE from dataref analysis

2025-07-25 Thread Robin Dapp
So what was prevailing_mode then? RVVM2SI, so != word_mode, and basically two glued 32-bit vector regs. We get that from the first call with innermode SI. But /* Fall back to using mode_for_vector, mostly in the hope of being able to use an integer mode. */ if (known_eq

Re: [PATCH 1/4] i386: Ignore regparm attribute and warn for it in 64-bit mode

2025-07-25 Thread Uros Bizjak
On Thu, Jul 24, 2025 at 5:35 PM Artemiy Granat wrote: > > The regparm attribute does not affect code generation on x86-64 target. > Despite this, regparm was accepted silently, unlike other calling > convention attributes handled in the ix86_handle_cconv_attribute > function. > > Due to lack of di

[PATCH 4/5] Remove load interleaving code

2025-07-25 Thread Richard Biener
The following removes the non-SLP load interleaving code which was almost unused. * tree-vectorizer.h (vect_grouped_load_supported): Remove. (vect_transform_grouped_load): Likewise. (vect_record_grouped_load_vectors): Likewise. * tree-vect-data-refs.cc (vect_grouped

Re: [Patch] gcn: Add "s_nop"s for MI300

2025-07-25 Thread Andrew Stubbs
On 24/07/2025 20:13, Tobias Burnus wrote: Andrew Stubbs wrote: On 24/07/2025 16:49, Tobias Burnus wrote: Andrew Stubbs wrote: On 24/07/2025 14:25, Tobias Burnus wrote: +/* Device requires CDNA1-style manually inserted wait states for AVGPRs.  */ +#define TARGET_AVGPR_CDNA3_NOPS TARGET_CDNA3

Re: [PATCH 4/4] Do not set STMT_VINFO_VECTYPE from dataref analysis

2025-07-25 Thread Robin Dapp
It's probably changes from the RVV cost modeling behavior, the patches are of course not supposed to change code generation. Looks like a proper corner case... From what I can see the difference to before is that we now always call get_related_vectype_for_scalar_type with VOIDmode while we u

Re: [PATCH v2 1/1] aarch64: Add support for unpacked SVE FP conditional binary arithmetic

2025-07-25 Thread Spencer Abson
On Thu, Jul 24, 2025 at 01:27:10PM +, Remi Machet wrote: > > On 7/24/25 08:19, Spencer Abson wrote: > > External email: Use caution opening links or attachments > > > > > > This patch extends the expander for conditional smax, smin, add, sub, mul, > > min, max, and div to support partial SVE F

Re: [PATCH v3] c++, coroutines: Handle allocation fail returns [PR121219].

2025-07-25 Thread Iain Sandoe
> On 24 Jul 2025, at 17:52, Iain Sandoe wrote: >> On 24 Jul 2025, at 17:46, Jason Merrill wrote: >> >> On 7/24/25 12:39 PM, Iain Sandoe wrote: On 24 Jul 2025, at 17:31, Jason Merrill wrote: On 7/24/25 10:24 AM, Iain Sandoe wrote: >> The patch is OK without the assert, we

[COMMITTED 2/7] ada: Fix regression of finalization primitive selection

2025-07-25 Thread Marc Poulhiès
From: Ronan Desplanques A recent patch introduced a new flag to mark the types for which looking up finalization primitives needs special handling. But there was one place in Build_Derived_Record_Type where the flag was not set when it should, which introduced a regression in some cases. This pa

[COMMITTED 1/7] ada: Fix inconsistencies in conversion functions from Duration

2025-07-25 Thread Marc Poulhiès
From: Eric Botcazou The 3 units Ada.Calendar, GNAT.Calendar and GNAT.Sockets contain conversion functions from the Duration fixed-point type that implement the same idiom but with some inconsistencies: * GNAT.Sockets only handles Timeval_Duration, i.e. positive Duration, and is satisfactor

[COMMITTED 5/7] ada: Follow up fixes.

2025-07-25 Thread Marc Poulhiès
From: Steve Baird Two follow-up fixes for the previous change for this issue. gcc/ada/ChangeLog: * exp_ch6.adb (Apply_Access_Discrims_Accessibility_Check): Do nothing and simply return if either Ada_Version <= Ada_95 or if the function being returned from lacks the extra

[COMMITTED 4/7] ada: Bug in Indefinite_Holders instance passed to formal package

2025-07-25 Thread Marc Poulhiès
From: Bob Duff Fix bug when an instance of Indefinite_Holders with a class-wide type is passed as a generic formal package; Program_Error was raised when dealing with the implicit "=" function. The fix is to disable legality checks in formal packages when the entity is an E_Subprogram_Body, beca

[PATCH 5/5] Remove store interleaving support

2025-07-25 Thread Richard Biener
The following removes the non-SLP store interleaving support which was already almost unused. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. * tree-vectorizer.h (vect_grouped_store_supported): Remove. (vect_permute_store_chain): Likewise. * tree-v

[PATCH 1/5] Remove dead code from vectorizable_store

2025-07-25 Thread Richard Biener
There's dead code in the else block of a if (!costing_p) block, after trivial pruning only setting of 'op' remains but that has no further uses downstream. I found this looking for remaining (must-be-dead) uses of vect_get_vec_defs_for_operand. * tree-vect-stmts.cc (vectorizable_store): R

[COMMITTED 3/7] ada: Update comments

2025-07-25 Thread Marc Poulhiès
From: Ronan Desplanques A previous patch changed the mechanism of early usage detection for discriminants but failed to update a couple of surrounding comments accordingly. This patch fixes this omission. gcc/ada/ChangeLog: * sem_ch3.adb (Process_Discriminants): Update comments Tested

[COMMITTED 7/7] ada: Minor cleanup

2025-07-25 Thread Marc Poulhiès
Renamed local variables to make it easier to read. gcc/ada/ChangeLog: * gcc-interface/utils.cc (update_pointer_to): Renamed ptr/old_ptr, ref/old_ref. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/gcc-interface/utils.cc | 31 --- 1 file cha

Re: [PATCH 2/4] i386: Fix incorrect comment about stdcall and fastcall compatibility

2025-07-25 Thread Uros Bizjak
On Thu, Jul 24, 2025 at 5:35 PM Artemiy Granat wrote: > > gcc/ChangeLog: > > * config/i386/i386-options.cc (ix86_handle_cconv_attribute): > Fix comments which state that combination of stdcall and fastcall > attributes is valid but redundant. OK as an obvious patch. Thank

Re: [PATCH 4/4] i386: Fix typo in diagnostic about simultaneous regparm and thiscall use

2025-07-25 Thread Uros Bizjak
On Thu, Jul 24, 2025 at 5:35 PM Artemiy Granat wrote: > > gcc/ChangeLog: > > * config/i386/i386-options.cc (ix86_handle_cconv_attribute): > Fix typo. OK, and also obvious. Thanks, Uros. > --- > gcc/config/i386/i386-options.cc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion

Re: [PATCH v3 3/3] libstdc++: Implement aligned_accessor from mdspan [PR120994]

2025-07-25 Thread Luc Grosheintz
On 7/23/25 11:25, Luc Grosheintz wrote: This commit completes the implementation of P2897R7 by implementing and testing the template class aligned_accessor. PR libstdc++/120994 libstdc++-v3/ChangeLog: * include/bits/version.def (aligned_accessor): Add. * include/bits

Re: [PATCH v3 3/3] libstdc++: Implement aligned_accessor from mdspan [PR120994]

2025-07-25 Thread Tomasz Kaminski
On Fri, Jul 25, 2025 at 10:37 AM Luc Grosheintz wrote: > > > On 7/23/25 11:25, Luc Grosheintz wrote: > > This commit completes the implementation of P2897R7 by implementing and > > testing the template class aligned_accessor. > > > > PR libstdc++/120994 > > > > libstdc++-v3/ChangeLog: > > >

Re: [PATCH] RISC-V: Prepare dynamic LMUL heuristic for SLP.

2025-07-25 Thread Kito Cheng
HI Robin: I was a bit concerned about the stmt_vec_info -> slp_tree hash map at first, but I realized that it’s just a temporary hack, so LGTM :) On Thu, Jul 24, 2025 at 9:09 PM Richard Biener wrote: > > On Tue, Jul 22, 2025 at 11:46 AM Robin Dapp wrote: > > > > Hi, > > > > This patch prepares

Re: [Patch] gcn: Add more s_nop for MI300

2025-07-25 Thread Andrew Stubbs
On 25/07/2025 11:54, Tobias Burnus wrote: There are still issues with MI300, some which get resolved by adding s_nop. One case where it is exactly known where the s_nop fixes a fail is for libgomp.c-c++-common/task-detach-10.c, where libgomp/single.c's GOMP_single_start() never returns 1, such t

[PATCH 1/2] Remove unused stmt_vectype

2025-07-25 Thread Richard Biener
The following removes an unused accessor to data that should go away. * target.h (stmt_vectype): Remove. * tree-vect-stmts.cc (stmt_vectype): Likewise. --- gcc/target.h | 1 - gcc/tree-vect-stmts.cc | 8 2 files changed, 9 deletions(-) diff --git a/gcc/target.h

[PATCH] aarch64: Add tuning model for Olympus core.

2025-07-25 Thread Jennifer Schmitz
This patch adds a new tuning model for the NVIDIA Olympus core. The values used here are based on the Software Optimization Guide that will be published imminently. Bootstrapped and tested on aarch64-linux-gnu, no regression. OK for trunk? OK to backport to GCC 15? Signed-off-by: Jennifer Schmit

[PATCH 2/2] Reduce the number of STMT_VINFO_VECTYPE uses

2025-07-25 Thread Richard Biener
The following adjusts uses of STMT_VINFO_VECTYPE to look elsewhere where obvious. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. * tree-vect-loop.cc (vect_analyze_loop_2): Get vectype from the SLP node. (vectorize_fold_left_reduction): Likewise. (vect

[commited v2] libstdc++: doc: Rectify referencing of non-existent type

2025-07-25 Thread Tomasz Kamiński
From: Tuur Martens The unordered_map header incorrectly refers to a non-existent template parameter _Value in default template argument descriptions. They should refer to _Key instead. This patch fixes these descriptions to match the actual template parameters. libstdc++-v3/ChangeLog:

Re: [PATCH] libstdc++: doc: Rectify referencing of non-existent type

2025-07-25 Thread Tomasz Kaminski
On Tue, Jul 22, 2025 at 10:04 AM wrote: > From: Tuur Martens > > The unordered_map header incorrectly refers to a non-existent template > parameter _Value in default template argument descriptions. They should > refer to _Key instead.\n\nThis patch fixes these descriptions to match the > actual

[PATCH] libstdc++: Support braces as arguments for std::erase on inplace_vector [PR121196]

2025-07-25 Thread Tomasz Kamiński
PR libstdc++/121196 libstdc++-v3/ChangeLog: * include/std/inplace_vector (std::erase): Provide default argument for _Up parameter. * testsuite/23_containers/inplace_vector/erasure.cc: Add test for using braces-init-list as arguments to erase_if and use func

Re: [PATCH] RISC-V: Prepare dynamic LMUL heuristic for SLP.

2025-07-25 Thread Robin Dapp
I was a bit concerned about the stmt_vec_info -> slp_tree hash map at first, but I realized that it’s just a temporary hack, so LGTM :) Thanks, going to commit in a while. Of course you know: "There is nothing more permanent than a temporary solution." :) -- Regards Robin

Re: [PATCH] c++/modules: Stream some missing lang_type flags

2025-07-25 Thread Patrick Palka
On Fri, 25 Jul 2025, Nathaniel Shead wrote: > Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? > > -- >8 -- > > I noticed that C++26 trivial relocation didn't work in modules yet, and > there are a couple of other flags that seem potentially useful we > weren't streaming. This s

Re: [PATCH 4/4] Do not set STMT_VINFO_VECTYPE from dataref analysis

2025-07-25 Thread Robin Dapp
OK, so actually generating code with that vector(1) is bad (slower than using scalar code)? Was that the same for PR121048? The general situation is similar but IIRC we had a real vector mode there. There the code didn't look terrible apart from using very small vectors (2 elements). Here I gu

Re: [PATCH] Prevent mixups of IDENTIFIER_TRANSPARENT_ALIAS and IDENTIFIER_INTERNAL_P better [PR120855]

2025-07-25 Thread Jason Merrill
On 7/24/25 10:07 PM, Nathaniel Shead wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu. Also verified that it fixes the regression on an mcore-elf cross. OK for trunk? OK. -- >8 -- The assertion failure on ASM_OUTPUT_WEAKREF targets since my r16-1738 was caused because the 'TREE_CHA

[PATCH 1/2] Fix and simplify vect_model_simple_cost

2025-07-25 Thread Richard Biener
There's no longer any call without SLP node so we don't need dts. I also figured based on the callers that some expect to cost more than one stmt but still N times so this changes what we cost. * tree-vect-stmts.cc (vect_model_simple_cost): Removed code when no SLP node is passed,

[PATCH 2/2] Tidy vect_is_simple_use API for SLP only

2025-07-25 Thread Richard Biener
The following removes one vect_is_simple_use overload that shouldn't be used anymore after removing the single remaining use related to gather handling in get_group_load_store_type. It also removes the dual-purpose of the overload getting both SLP node and stmt_vec_info and removes the latter argu

Re: [PATCH 4/4] Do not set STMT_VINFO_VECTYPE from dataref analysis

2025-07-25 Thread Richard Biener
On Fri, 25 Jul 2025, Robin Dapp wrote: > > OK, so actually generating code with that vector(1) is bad (slower > > than using scalar code)? Was that the same for PR121048? > > The general situation is similar but IIRC we had a real vector mode there. > There the code didn't look terrible apart fr

[PATCH] Remove now redundant vect_get_vec_defs overload

2025-07-25 Thread Richard Biener
The following removes the vect_get_vec_defs overload receiving a vector type to be used for the possibly constant/invariant operand. This was used for non-SLP code generation as there constants/invariants are generated on the fly. It also elides the stmt_vec_info and ncopies argument which are no

[PATCH v1 1/4] RISC-V: Combine vec_duplicate + vaadd.vv to vaadd.vx on GR2VR cost

2025-07-25 Thread pan2 . li
From: Pan Li This patch would like to combine the vec_duplicate + vaadd.vv to the vaadd.vx. From example as below code. The related pattern will depend on the cost of vec_duplicate from GR2VR. Then the late-combine will take action if the cost of GR2VR is zero, and reject the combination if th

[PATCH v1 2/4] RISC-V: Add test for vec_duplicate + vaadd.vv combine case 0 with GR2VR cost 0, 1 and 15

2025-07-25 Thread pan2 . li
From: Pan Li Add asm dump check and run test for vec_duplicate + vaadd.vv combine to vaadd.vx, with the GR2VR cost is 0, 2 and 15 gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/vx_vf/vx-1-i16.c: Add asm check. * gcc.target/riscv/rvv/autovec/vx_vf/vx-1-i32.c: Ditto.

[PATCH v1 0/4] RISC-V: Combine vec_duplicate + vaadd.vv to vaadd.vx on GR2VR cost

2025-07-25 Thread pan2 . li
From: Pan Li This patch would like to introduce the combine of vec_dup + vaadd.vv into vaadd.vx on the cost value of GR2VR. The late-combine will take place if the cost of GR2VR is zero, or reject the combine if non-zero like 1, 2, 15 in test. There will be two cases for the combine: Case 0:

[PATCH v1 3/4] RISC-V: Add test for vec_duplicate + vaadd.vv combine case 1 with GR2VR cost 0, 1 and 2

2025-07-25 Thread pan2 . li
From: Pan Li Add asm dump check test for vec_duplicate + vaadd.vv combine to vaadd.vx, with the GR2VR cost is 0, 1 and 2 gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/vx_vf/vx-4-i16.c: Add asm check. * gcc.target/riscv/rvv/autovec/vx_vf/vx-4-i32.c: Ditto. * gcc

Re: [PATCH 2/2] libstdc++: Protect std::shared_ptr against counter overflow [PR71945]

2025-07-25 Thread Tomasz Kaminski
On Fri, Jul 18, 2025 at 9:50 PM Jonathan Wakely wrote: > On Fri, 18 Jul 2025 at 19:18, Tomasz Kaminski wrote: > > > > > > > > On Fri, Jul 18, 2025 at 8:03 PM Jonathan Wakely > wrote: > >> > >> This adds a check when incrementing the shared count and weak count and > >> will trap if it overflows

Re: [PATCH 4/4] Do not set STMT_VINFO_VECTYPE from dataref analysis

2025-07-25 Thread Richard Biener
On Fri, 25 Jul 2025, Robin Dapp wrote: > > I've folded the "vectorizer status" into the beginning of the BoF, > > so "only" two slots from my side. > > Do you still need/want some status from the riscv vector side for the BoF? > If so, what would that entail? Rather a look back on what has been

Re: [PATCH 2/2] libstdc++: Protect std::shared_ptr against counter overflow [PR71945]

2025-07-25 Thread Tomasz Kaminski
On Fri, Jul 18, 2025 at 8:03 PM Jonathan Wakely wrote: > This adds a check when incrementing the shared count and weak count and > will trap if it overflows. This also double the effective range of the > counts for most 64-bit targets. > > The counter type, _Atomic_word, is usually a signed 32-bi

Re: [GCC15][PATCH 2/2] C: Flex array in union followed by a structure field is not reported [PR120354]

2025-07-25 Thread Qing Zhao
Based on Joseph’s review comment on May 30, 2025: https://gcc.gnu.org/pipermail/gcc-patches/2025-May/685211.html I will push this patch to GCC15. Qing > On Jul 24, 2025, at 09:36, Qing Zhao wrote: > > Ping. > > The patch has been committed to trunk 2 months ago. > > Okay for committing to GC

Re: [GCC15][PATCH 1/2] C: Flex array in the middle via type alias is not reported [PR120353]

2025-07-25 Thread Qing Zhao
Based on Joseph’s review comments on May 30, 2025. https://gcc.gnu.org/pipermail/gcc-patches/2025-May/685211.html I will push this patch to GCC15 if no further concern in a day. Qing > On Jul 24, 2025, at 09:36, Qing Zhao wrote: > > Ping. > > The patch has been committed to trunk 2 months ago

Re: [PATCH 4/4] Do not set STMT_VINFO_VECTYPE from dataref analysis

2025-07-25 Thread Robin Dapp
I've folded the "vectorizer status" into the beginning of the BoF, so "only" two slots from my side. Do you still need/want some status from the riscv vector side for the BoF? If so, what would that entail? Rather a look back on what has been done or an outlook of what we're looking at? -- R

Re: [PATCH 1/2] libstdc++: Make atomicity helpers use unsigned arithmetic [PR121148]

2025-07-25 Thread Tomasz Kaminski
On Fri, Jul 18, 2025 at 8:03 PM Jonathan Wakely wrote: > The standard requires that std::atomic::fetch_add does > not have undefined behaviour for signed overflow, instead it wraps like > unsigned integers. The compiler ensures this is true for the atomic > built-ins that std::atomic uses, but it

Re: [PATCH] libstdc++: Teach std::distance and std::advance about C++20 iterators [PR102181]

2025-07-25 Thread Patrick Palka
On Fri, 18 Jul 2025, Jonathan Wakely wrote: > When the C++98 std::distance and std::advance functions (and C++11 > std::next and std::prev) are used with C++20 iterators there can be > unexpected results, ranging from compilation failure to decreased > performance to undefined behaviour. > > An i

[PATCH] Don't pass vector params through to offload targets

2025-07-25 Thread Andrew Stubbs
Hi all, The optimization options are deliberately passed through to the LTO compiler, but when the same mechanism is reused for offloading it ends up forcing the host compiler settings onto the device compiler. Maybe this should be removed completely, but this patch just fixes a few of them. In

Re: [PATCH] libstdc++: Support braces as arguments for std::erase on inplace_vector [PR121196]

2025-07-25 Thread Patrick Palka
On Fri, 25 Jul 2025, Tomasz Kaminski wrote: > > > On Fri, Jul 25, 2025 at 4:57 PM Tomasz Kaminski wrote: > > > On Fri, Jul 25, 2025 at 4:49 PM Patrick Palka wrote: > On Fri, 25 Jul 2025, Tomasz Kamiński wrote: > > >       PR libstdc++/121196 > > > > libstdc++-v3/Chan

Re: [PATCH v2 3/3] vect: Use strided loads for VMAT_STRIDED_SLP.

2025-07-25 Thread Robin Dapp
I'm not sure whether handling this case as part of VMAT_STRIDED_SLP is wise. IIRC we do already choose VMAT_GATHER_SCATTER for some strided loads, so why not do strided load/store handling as part of gather/scatter handling? Now that we can deal with gather/scatter misalignment I think we can c

[PATCHv2] libstdc++: provide debug impl of P2697 ctor [PR119742]

2025-07-25 Thread Nathan Myers
Changes in v2: * The second, size argument to the base class constructor needs to be more careful about overflowing the string_view argument, because the base class has no independent information about the actual bounds of the array passed. This adds the new bitset constructor from string_

[PATCH 26/34] diagnostics: move diagnostic.c to diagnostics/context.cc

2025-07-25 Thread David Malcolm
No functional change intended. gcc/ChangeLog: * Makefile.in (OBJS-libcommon): Replace diagnostic.o with diagnostics/context.o. gcc/c-family/ChangeLog: * c-common.cc (c_family_tests): Add include of "diagnostics/diagnostics-selftests.h". Replace c_diagnosti

[PATCH 18/34] diagnostics: move gcc/selftest-diagnostic.{h, cc} -> gcc/diagnostics/selftest-context.{h, cc}

2025-07-25 Thread David Malcolm
No functional change intended. gcc/ChangeLog: * Makefile.in (OBJS-libcommon): Replace selftest-diagnostic.o with diagnostics/selftest-context.o. * diagnostic.cc: Update for move of selftest-diagnostic.h to diagnostics/selftest-context.h. * diagnostics/html-s

[PATCH 14/34] diagnostics: move diagnostic_info to its own header

2025-07-25 Thread David Malcolm
No functional change intended. gcc/ChangeLog: * diagnostic.h (struct diagnostic_info): Move to diagnostics/diagnostic-info.h as diagnostics::diagnostic_info. Add typedef bringing it back into root namespace, for now. * diagnostics/diagnostic-info.h: New file, based

[PATCH 30/34] diagnostics: introduce context-options.h

2025-07-25 Thread David Malcolm
No functional change intended. gcc/ChangeLog: * diagnostic.h (enum diagnostics_column_unit): Move to diagnostics/context-options.h. (enum diagnostics_escape_format): Likewise. (enum diagnostics_output_format): Likewise. (enum diagnostic_path_format): Likewis

[PATCH 09/34] diagnostics: introduce namespace diagnostics::paths

2025-07-25 Thread David Malcolm
Move more diagnostic-specific code from gcc/ to gcc/diagnostics/ No functional change intended. contrib/ChangeLog: * filter-clang-warnings.py: Update for move of diagnostic-path-output.cc to diagnostics/paths-output.cc. gcc/ChangeLog: * Makefile.in (OBJS): Replace lazy-di

[PATCH 11/34] diagnostics: introduce diagnostics/source-printing.cc

2025-07-25 Thread David Malcolm
Move diagnostic-show-locus.cc to diagnostics/source-printing.cc Move diagnostic-label-effects.h to diagnostics/source-printing-effects.h Move selftest-diagnostic-show-locus.h to diagnostics/selftest-source-printing.h No functional change intended. gcc/ChangeLog: * Makefile.in (OBJS):

[PATCH] Remove STMT_VINFO_VEC_STMTS

2025-07-25 Thread Richard Biener
The following removes the last uses of STMT_VINFO_VEC_STMTS and the vector itself. Vector stmts are recorded in SLP nodes now. The last use is a bit strange - it was introduced by Richard S. in r8-6064-ga57776a1136962 and affects only power7 and below (the re-align optimized load path). The chec

[PATCH 3/5] Remove vect_get_vec_defs_for_operand

2025-07-25 Thread Richard Biener
This removes vect_get_vec_defs_for_operand and its remaining uses. It also removes some remaining non-SLP paths in preparation to elide STMT_VINFO_VEC_STMTS. * tree-vectorizer.h (vect_get_vec_defs_for_operand): Remove. * tree-vect-stmts.cc (vect_get_vec_defs_for_operand): Likewise.

Re: [PATCH 3/4] i386: Fix incorrect handling of simultaneous regparm and thiscall use

2025-07-25 Thread Uros Bizjak
On Thu, Jul 24, 2025 at 5:35 PM Artemiy Granat wrote: > > gcc/ChangeLog: > > * config/i386/i386-options.cc (ix86_handle_cconv_attribute): > Handle simultaneous use of regparm and thiscall attributes in > case when regparm is set before thiscall. > > gcc/testsuite/ChangeLog:

[PATCH 2/5] Remove VMAT_CONTIGUOUS_PERMUTE

2025-07-25 Thread Richard Biener
This VMAT was used for interleaving which was non-SLP only. The following removes code gated by it (code selecting it is already gone). * tree-vectorizer.h (VMAT_CONTIGUOUS_PERMUTE): Remove. * tree-vect-stmts.cc (check_load_store_for_partial_vectors): Remove checks on VMAT

[COMMITTED 6/7] ada: ppc-vx6: pthread clocks and headers for decls

2025-07-25 Thread Marc Poulhiès
From: Alexandre Oliva VxWorks 6 lacks pthread_condattr_setclock, so define CLOCK_RT_Ada to CLOCK_REALTIME to use the dummy definition of __gnat_pthread_condattr_setup in libgnarl/thread.c. socket.c and sysdep.c use FD_ZERO, that relies on bzero on VxWorks 6. We need to include strings.h to get a

[PATCH] Make it fast again

2025-07-25 Thread Tomasz Kamiński
Instead of using "::__overflow" using "__fwritable" and handle flushing empty writebuf in constructor. --- This removes unconditional flushing in _File constructor, and replace it with writeability check only. The flush is performed conditionally in _File_sink constructor, only if the _M_writebuf i

Re: [PATCH] Make it fast again

2025-07-25 Thread Tomasz Kaminski
Please ignore, send to the list by accident. On Fri, Jul 25, 2025 at 11:59 AM Tomasz Kamiński wrote: > Instead of using "::__overflow" using "__fwritable" and handle > flushing empty writebuf in constructor. > --- > This removes unconditional flushing in _File constructor, and > replace it with

[Patch] gcn: Add more s_nop for MI300

2025-07-25 Thread Tobias Burnus
There are still issues with MI300, some which get resolved by adding s_nop. One case where it is exactly known where the s_nop fixes a fail is for libgomp.c-c++-common/task-detach-10.c, where libgomp/single.c's GOMP_single_start() never returns 1, such that 'omp single' is never executed. Adding

Re: [PATCH 4/4] Do not set STMT_VINFO_VECTYPE from dataref analysis

2025-07-25 Thread Richard Biener
On Fri, 25 Jul 2025, Robin Dapp wrote: > > So what was prevailing_mode then? > > RVVM2SI, so != word_mode, and basically two glued 32-bit vector regs. > We get that from the first call with innermode SI. > > > > > But > > > > /* Fall back to using mode_for_vector, mostly in the hope of bei

Re: [PATCH] RISC-V: Remove user-level interrupts

2025-07-25 Thread Kito Cheng
LGTM :) On Fri, Jul 25, 2025 at 5:30 PM Christoph Müllner < christoph.muell...@vrull.eu> wrote: > There was once a RISC-V extension draft ("N"), which introduced > user-level interrupts. However, it was never ratified and the > specification draft has been removed from the RISC-V ISA manual > in

[PATCH] [sanitizer_common] Remove reference to obsolete termio ioctls (#138822)

2025-07-25 Thread Sam James
Cherry picked from LLVM commit c99b1bcd505064f2e086e6b1034ce0b0c91ea5b9. The termio ioctls are no longer used after commit 59978b21ad9c ("[sanitizer_common] Remove interceptors for deprecated struct termio (#137403)"), remove them. Fixes this build error: ../../../../libsanitizer/sanitizer_commo

[PATCH 21/34] diagnostics: reorganize selftests

2025-07-25 Thread David Malcolm
No functional change intended. gcc/ChangeLog: * Makefile.in (OBJS): Move diagnostics/lazy-paths.o to... (OBJS-libcommon): ...here. Add diagnostics/diagnostics-selftests.o. * diagnostic.cc: Update for move of selftest::test_diagnostic_context to diag

[PATCH 20/34] diagnostics: gcc/diagnostic-url.h -> gcc/diagnostics/url.h

2025-07-25 Thread David Malcolm
No functional change intended. gcc/ChangeLog: * common.opt: Update for move of diagnostic-url.h to diagnostics/url.h. * diagnostic.cc: Likewise. * diagnostics/color.cc: Likewise. * diagnostics/text-sink.cc: Likewise. * diagnostic-url.h: Move to...

[PATCH 03/34] diagnostics: move diagnostic_metadata to diagnostics::metadata

2025-07-25 Thread David Malcolm
renamed: gcc/diagnostic-metadata.h -> gcc/diagnostics/metadata.h No functional change intended. gcc/analyzer/ChangeLog: * diagnostic-manager.cc: Update for move of diagnostic_metadata to diagnostics::metadata. * kf.cc: Likewise. * pending-diagnostic.h: Likewise; al

[PATCH 06/34] diagnostics: move client data hooks into namespace/dir "diagnostics"

2025-07-25 Thread David Malcolm
No functional change intended. Note that the tree-*.cc implementations are *not* moved into namespace diagnostics. gcc/ChangeLog: * diagnostic-format-html.cc: Update #include for move of diagnostic-client-data-hooks.h to diagnostics/client-data-hooks.h. * diagnostic-format

[PATCH 27/34] diagnostics: simplify header files

2025-07-25 Thread David Malcolm
No functional change intended. gcc/ChangeLog: * diagnostic.h: Move include of "unique-argv.h" and various forward decls into... * diagnostics/context.h: ...here. --- gcc/diagnostic.h | 37 ++--- gcc/diagnostics/context.h | 35 ++

Re: [PATCH v2 3/3] vect: Use strided loads for VMAT_STRIDED_SLP.

2025-07-25 Thread Robin Dapp
That would definitely be nice to have for both gather and stride loads I'm not sure I like the direction that's heading ;) So the loop I'm targeting is x264's satd: for( int i = 0; i < 4; i++, pix1 += i_pix1, pix2 += i_pix2 ) { a0 = (pix1[0] - pix2[0])... a1 = (pix1[1] -

[PATCHv3] libstdc++: provide debug impl of P2697 ctor [PR119742]

2025-07-25 Thread Nathan Myers
Changed in v3: * Rely on std/bitset's string_view ctor for bounds checking. This adds the new bitset constructor from string_view defined in P2697 to the debug version of the type. libstdc++-v3/Changelog: PR libstdc++/119742 * include/debug/bitset: Add new ctor. --- libstdc++-v3

[PATCH 13/34] diagnostics: add m_ prefix to fields of diagnostic_info

2025-07-25 Thread David Malcolm
No functional change intended. gcc/c-family/ChangeLog: * c-opts.cc (c_diagnostic_text_finalizer): Add "m_" prefix to fields of diagnostic_info. gcc/c/ChangeLog: * c-errors.cc: Update to add "m_" prefix to fields of diagnostic_info throughout. gcc/cp/ChangeLog:

[PATCH 19/34] diagnostics: move gcc/diagnostic-color.{h, cc} to gcc/diagnostics/color.{h, cc}

2025-07-25 Thread David Malcolm
No functional change intended. gcc/ChangeLog: * Makefile.in (OBJS-libcommon): Replace diagnostic-color.o with diagnostics/color.o. (PLUGIN_HEADERS): Remove diagnostic-color.h in favor of glob. * common.opt: Update for move of diagnostic-color.h to diagnostic

[PATCH 24/34] diagnostics: rename diagnostic_option_id to diagnostics::option_id and move to its own header

2025-07-25 Thread David Malcolm
No functional change intended. gcc/c-family/ChangeLog: * c-common.cc: Update for renaming of diagnostic_option_id to diagnostics::option_id. * c-common.h: Likewise. * c-cppbuiltin.cc: Likewise. * known-headers.cc: Likewise. * known-headers.h: Likewis

[PATCH 29/34] diagnostics: move file_cache from input.{cc, h} to diagnostics/file-cache.{cc, h}

2025-07-25 Thread David Malcolm
No functional change intended. gcc/ChangeLog: * Makefile.in (OBJS-libcommon): Add diagnostics/file-cache.o. * diagnostics/changes.cc: Update for file_cache and char_span moving from input.h to diagnostics/file-cache.h and into the "diagnostics::" namespace.

[PATCH 32/34] diagnostics: make context::m_source_printing private

2025-07-25 Thread David Malcolm
No functional change intended. gcc/ada/ChangeLog: * gcc-interface/misc.cc: Make diagnostics::context::m_source_printing private. gcc/analyzer/ChangeLog: * program-point.cc: Make diagnostics::context::m_source_printing private. gcc/c-family/ChangeLog: * c-c

[PATCH 31/34] diagnostics: eliminate ::diagnostic_info typedef

2025-07-25 Thread David Malcolm
No functional change intended. gcc/c-family/ChangeLog: * c-common.cc: Update usage of "diagnostic_info" to explicitly refer to "diagnostics::diagnostic_info". * c-opts.cc: Likewise. gcc/c/ChangeLog: * c-errors.cc: Update usage of "diagnostic_info" to explicitly

[PATCH 34/34] Introduce lazily-created.h

2025-07-25 Thread David Malcolm
No functional change intended. gcc/ChangeLog: * diagnostics/context.cc: Eliminate digraphs::lazy_digraph in favor of lazily_created template. * diagnostics/context.h: Likewise. * diagnostics/digraphs.cc: Likewise, also digraphs::lazy_digraphs. * diagnostics/

[PATCH 23/34] Rename diagnostic-spec.{cc, h} to gcc-diagnostic-spec.{cc, h}

2025-07-25 Thread David Malcolm
This has GCC-specific stuff in it (options and "GTY"), and so should not be in the "diagnostics/" subdir, and should avoid a "diagnostics" prefix in its name. No functional change intended. gcc/ChangeLog: * Makefile.in (OBJS-libcommon): Replace diagnostic-spec.o with gcc-diagnosti

[PATCH 22/34] diagnostics: move diagnostics::edit_context -> diagnostics::changes::change_set

2025-07-25 Thread David Malcolm
No functional change intended. gcc/ChangeLog: * Makefile.in (OBJS-libcommon): Replace diagnostics/changes.o with diagnostics/edit-context.o. * diagnostic.cc: Update for move of diagnostics/edit-context.h to diagnostics/changes.h. (diagnostics::context::initi

[PATCH] RISC-V: riscv-ext.def: Add allocated group IDs and group bit positions

2025-07-25 Thread Christoph Müllner
The riscv-c-api-doc defines a group ID and and a bit position for some extension. Most of them are set in riscv-ext.def, but some are missing and one bit position (for Zilsd) is wrong. This patch replaces the `BITMASK_NOT_YET_ALLOCATED` value for the actual allocated value wherever possible and f

  1   2   >