Re: [PATCH] cse: Fix up record_jump_equiv checks [PR117095]

2024-12-13 Thread Jeff Law
On 12/13/24 8:20 AM, Jakub Jelinek wrote: Hi! The following testcase is miscompiled on s390x-linux with -O2 -march=z15. The problem happens during cse2, which sees in an extended basic block (jump_insn 217 78 216 10 (parallel [ (set (pc) (if_then_else (ne (reg:SI

Re: [PATCH v2] RISC-V: Increase cost for vec_construct [PR118019].

2024-12-13 Thread 钟居哲
OK. juzhe.zh...@rivai.ai From: Robin Dapp Date: 2024-12-13 23:20 To: gcc-patches CC: pal...@dabbelt.com; kito.ch...@gmail.com; juzhe.zh...@rivai.ai; jeffreya...@gmail.com; pan2...@intel.com; rdapp@gmail.com Subject: [PATCH v2] RISC-V: Increase cost for vec_construct [PR118019]. Hi, for

[COMMITTED 15/20] ada: Fix code indentation

2024-12-13 Thread Marc Poulhiès
From: Piotr Trojanek Fix uncontroversial coding style violations detected by an experiment with a tree-sitter indentation support in Emacs. gcc/ada/ChangeLog: * atree.adb, diagnostics-pretty_emitter.adb, diagnostics-utils.adb, einfo-utils.adb, errout.adb, exp_aggr.adb, e

[COMMITTED 02/20] ada: Remove implicit assumption in the double case

2024-12-13 Thread Marc Poulhiès
From: Eric Botcazou The assumption is fulfilled in all the instantiations of the package, but it should not be made in the generic code. gcc/ada/ChangeLog: * libgnat/s-imager.adb (Set_Image_Real): In the case where a double integer is needed, do not implicit assume that it can c

[COMMITTED 14/20] ada: Fix fixed point text-io when subtype has dynamic range

2024-12-13 Thread Marc Poulhiès
When the fixed point subtype has dynamic range, for example in the context of a generic procedure Test where Fixed_Type is a type formal: procedure Test (Low, High : Fixed_Type) is type New_Subtype is new Fixed_Type range Low .. High; package New_Io is new Text_IO.Fixed_IO (New_Subtype);

[COMMITTED 10/20] ada: Elide copy for calls in allocators for nonlimited by-reference types

2024-12-13 Thread Marc Poulhiès
From: Eric Botcazou This prevents a temporary from being created on the primary stack to hold the result of the function calls before it is copied to the newly allocated memory in the nonlimited by-reference case. That's already not done in the nonlimited non-by-reference case and there is no re

[COMMITTED 16/20] ada: Fix indentation in record component declarations

2024-12-13 Thread Marc Poulhiès
From: Piotr Trojanek Code cleanup. gcc/ada/ChangeLog: * exp_aggr.adb (Case_Bounds): Fix indentation. * sem_case.adb (Choice_Bounds): Likewise. * libgnat/s-dourea.ads (Duuble_T): Likewise. * libgnat/s-excmac__arm.ads (Cleanup_Cache_Type): Likewise. Tested on x86_

[COMMITTED 07/20] ada: Fix typo in reference manual

2024-12-13 Thread Marc Poulhiès
From: Ronan Desplanques gcc/ada/ChangeLog: * doc/gnat_rm/gnat_language_extensions.rst: Fix typo. * gnat_rm.texi: Regenerate. * gnat_ugn.texi: Regenerate. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/doc/gnat_rm/gnat_language_extensions.rst | 2 +- gc

[COMMITTED 17/20] ada: Improve expansion of nested conditional expressions in return statements

2024-12-13 Thread Marc Poulhiès
From: Eric Botcazou This arranges for nested conditional expressions in simple return statements to have their expansion delayed until the returns are distributed into their dependent expressions. This comprises the case of the elsif part of an if expression present in the source code. This als

[COMMITTED 20/20] ada: Fix internal error on packed record with 0-size component

2024-12-13 Thread Marc Poulhiès
From: Eric Botcazou The problem is that the order of components listed in a constant CONSTRUCTOR does not match that of the associated record type. gcc/ada/ChangeLog: * gcc-interface/utils2.cc (compare_elmt_bitpos): Deal specially with 0-sized components when the bit position is

[Patch] C++: reject OpenMP directives in constexpr functions

2024-12-13 Thread Tobias Burnus
OpenMP states for C++: "Directives may not appear in constexpr functions or in constant expressions." There is some support for this already in GCC, but not for [[omp::decl]]-type of directives and it also doesn't work that well. For the example, for the newly added testcase, the result with the

Re: [PATCH v1] RISC-V: Make vector strided load alias all other memories

2024-12-13 Thread Robin Dapp
OK. -- Regards Robin

[COMMITTED 01/20] ada: Adjust cut-off for scaling of floating-point numbers

2024-12-13 Thread Marc Poulhiès
From: Eric Botcazou The value needs to take into account denormals and encompass Maxdigs. gcc/ada/ChangeLog: * libgnat/s-imager.adb (Maxscaling): Change to Natural constant and add Maxdigs to value. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/libgnat/s-ima

[COMMITTED 03/20] ada: Further work in semantic analysis of iterated component associations

2024-12-13 Thread Marc Poulhiès
From: Eric Botcazou This finishes up the transition to preanalysis of a copy of the expression for iterated component associations in all contexts, thus voiding the need to clean things up afterward. However, this requires a larger cleanup in semantics analysis of aggregates, in particular for o

[COMMITTED 05/20] ada: Fix documentation of Ada.Real_Time.Timing_Events

2024-12-13 Thread Marc Poulhiès
From: Ronan Desplanques The GNAT reference manual stated that GNAT did not implement this language-defined package, but GNAT in fact does offer an implementation of it. gcc/ada/ChangeLog: * doc/gnat_rm/standard_library_routines.rst: Fix documentation. * gnat_rm.texi: Regenerate.

[COMMITTED 06/20] ada: Fix dangling reference with user-defined indexing of function call

2024-12-13 Thread Marc Poulhiès
From: Eric Botcazou This happens with a noncontrolled type because the user-defined indexing is expanded into a function call that binds the lifetime of the original call to its return value. The temporary must be created explicitly in this case, so that the front-end can control its lifetime.

[COMMITTED 04/20] ada: Exclude library units from gnatcov instrumentation

2024-12-13 Thread Marc Poulhiès
From: Ronan Desplanques Before this patch, we instrumented code that's only used during the build process to generate more code. This patch marks the code-generating code so it's not instrumented for coverage. gcc/ada/ChangeLog: * gnat2.gpr: Add library units to coverage exclusion list.

[COMMITTED 11/20] ada: Remove unused parameter from volatile type queries

2024-12-13 Thread Marc Poulhiès
From: Piotr Trojanek Routines Is_Effectively_Volatile and Is_Effectively_Volatile_For_Reading were always called with Ignore_Protected parameter set to True (or has been passed unmodified on recursive calls), so this parameter wasn't actually needed. Code cleanup; semantics is unaffected. gcc/a

[COMMITTED 08/20] ada: Fix breakage of GNATprove introduced by latest change

2024-12-13 Thread Marc Poulhiès
From: Eric Botcazou gcc/ada/ChangeLog: * sem_aggr.adb (Resolve_Aggr_Expr): Always perform a full analysis of the expression in SPARK mode. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_aggr.adb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) d

[COMMITTED 09/20] ada: Remove last call to Preanalyze_And_Resolve from Exp_Aggr

2024-12-13 Thread Marc Poulhiès
From: Eric Botcazou All the expressions are now at least preanalyzed in a non-iterated context, so we do not need to redo it in Aggr_Assignment_OK_For_Backend, given that Is_OK_Aggregate explicitly rejects iterated component associations. gcc/ada/ChangeLog: * exp_aggr.adb (Aggr_Assignme

[PATCH] RISC-V: Increase cost for vec_construct [PR118019].

2024-12-13 Thread Robin Dapp
Hi, for a generic vec_construct from scalar elements we need to load each scalar element and move it over to a vector register. This patch uses register-move cost and scalar_to_vec and multiplies it with the number of elements in the vector. This helps vectorization of e.g. x264 SATD with the def

??????[PATCH] RISC-V: Increase cost for vec_construct [PR118019].

2024-12-13 Thread ??????
Could you add testcase and dump tree check?? --Reply to Message-- On Fri, Dec 13, 2024 19:47 PM Robin Dapp

[Fortran, Patch, PR117347, v1] Fix array constructor not resolved in associate

2024-12-13 Thread Andre Vehreschild
Hi all, attached patch fixes an reject-valid of an array constructor in an associate by resolving the array constructor before parsing the associate-block. I am not 100% sure, if that is the right place to do this. But given, that there is already a special casing before the patch, I just propose

[COMMITTED 13/20] ada: Refactor code of Check_Ambiguous_Call and Valid_Conversion

2024-12-13 Thread Marc Poulhiès
From: Javier Miranda gcc/ada/ChangeLog: * sem_res.adb (Report_Ambiguous_Argument): Code cleanup. (Resolve): Code cleanup. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_res.adb | 24 +++- 1 file changed, 7 insertions(+), 17 deletions(-)

[COMMITTED 12/20] ada: Implement new rules about effectively volatile types in SPARK

2024-12-13 Thread Marc Poulhiès
From: Piotr Trojanek New rules make record types effectively volatile based on the effective volatility of their components; same for effectively volatile for reading. Now volatility composition for records works like volatility composition for arrays. gcc/ada/ChangeLog: * sem_util.adb

Re: [PATCH] RISC-V: Emit vector shift pattern for const_vector [PR117353].

2024-12-13 Thread 钟居哲
LGTM. juzhe.zh...@rivai.ai From: Robin Dapp Date: 2024-12-12 18:43 To: gcc-patches CC: pal...@dabbelt.com; kito.ch...@gmail.com; juzhe.zh...@rivai.ai; jeffreya...@gmail.com; pan2...@intel.com; rdapp@gmail.com Subject: [PATCH] RISC-V: Emit vector shift pattern for const_vector [PR117353].

[COMMITTED 18/20] ada: Cleanup preanalysis of static expressions

2024-12-13 Thread Marc Poulhiès
From: Javier Miranda During preanalysis, the frontend does not generate freeze nodes. The exception to this rule occurs during the preanalysis of default and per-object expressions, where static expressions are frozen. A patch merged six years ago to address an issue in this area introduced addi

[COMMITTED 19/20] ada: Pass artificial_p to create_type_decl

2024-12-13 Thread Marc Poulhiès
From: Tom Tromey The recent "nameless types" change to gcc-interface caused the gdb pretty-printer for VSS to fail. This happens because one call to create_type_decl unconditionally passes "true" as the "artificial_p" parameter. This patch changes this call to instead pass the entity's local ar

[PATCH] i386: Add vec_fm{addsub,subadd}v2sf4 patterns [PR116979]

2024-12-13 Thread Jakub Jelinek
Hi! As mentioned in the PR, the addition of vec_addsubv2sf3 expander caused the testcase to be vectorized and no longer to use fma. The following patch adds new expanders so that it can be vectorized again with the alternating add/sub fma instructions. There is some bug on the slp cost computatio

[committed] testsuite: Fix typo in directive names

2024-12-13 Thread Jakub Jelinek
Hi! Some directives in the test were #errror rather than #error. Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk as obvious. 2024-12-13 Jakub Jelinek * c-c++-common/cpp/embed-1.c: Use #error rather than #errror. --- gcc/testsuite/c-c++-common/cpp/embed-1.c.

Re: [PATCH] i386: Add vec_fm{addsub,subadd}v2sf4 patterns [PR116979]

2024-12-13 Thread Uros Bizjak
On Fri, Dec 13, 2024 at 9:57 AM Jakub Jelinek wrote: > > Hi! > > As mentioned in the PR, the addition of vec_addsubv2sf3 expander caused > the testcase to be vectorized and no longer to use fma. > The following patch adds new expanders so that it can be vectorized > again with the alternating add/

Re: [PATCH] SVE intrinsics: Fold svmul and svdiv by -1 to svneg for unsigned types

2024-12-13 Thread Jennifer Schmitz
> On 11 Dec 2024, at 13:01, Richard Sandiford wrote: > > External email: Use caution opening links or attachments > > > Jennifer Schmitz writes: >> As follow-up to >> https://gcc.gnu.org/pipermail/gcc-patches/2024-October/665472.html, >> this patch implements folding of svmul by -1 to svneg

[Fortran, Patch, PR114612, v1] Fix missing deep-copy for allocatable components of derived types having cycles.

2024-12-13 Thread Andre Vehreschild
Hi all, attached patch fixes deep-copying (or rather its former absence) for allocatable components of derived types having cyclic dependencies. Regtested ok on x86_64-pc-linux-gnu / F41. Ok for mainline? Regards, Andre -- Andre Vehreschild * Email: vehre ad gmx dot de From 4721060d14920

[PATCH v2] c++: Disallow decomposition of lambda bases [PR90321]

2024-12-13 Thread Nathaniel Shead
On Thu, Nov 21, 2024 at 04:01:02PM -0500, Marek Polacek wrote: > On Thu, Nov 07, 2024 at 09:48:52PM +1100, Nathaniel Shead wrote: > > Bootstrapped and lightly regtested on x86_64-pc-linux-gnu (so far just > > dg.exp), OK for trunk if full regtest succeeds? > > > > -- >8 -- > > > > Decomposition o

Re: [PATCH] replace atoi with strtoul in opts.cc, lto-wrapper.c, lto/lto.c [PR114542]

2024-12-13 Thread Heiko Eißfeldt
I think, I overlooked something, so please ignore that. I will prepare Patch V2 soon. On 12/9/24 8:13 PM, Heiko Eißfeldt wrote: Straight forward replacements of atoi() with strtoul() in order to avoid UB and detect invalid argument values. Tested with x86_64-pc-linux-gnu. 2024-12-09 Heiko Eißfe

Re: [PATCH] c++: Only prune capture proxies for constant variables at instantiation time [PR114292]

2024-12-13 Thread Simon Martin
Hi Marek, On 13 Dec 2024, at 0:44, Marek Polacek wrote: > On Thu, Dec 12, 2024 at 07:07:38PM +, Simon Martin wrote: >> We currently ICE upon the following valid (under -Wno-vla) code >> >> === cut here === >> void f(int c) { >> constexpr int r = 4; >> [&](auto) { int t[r * c]; }(0); >> }

[PATCH 1/2] RISC-V: Update Xsfvfnrclip implementation.

2024-12-13 Thread Jiawei
gcc/ChangeLog: * config/riscv/genrvv-type-indexer.cc (expand_floattype): New func. (main): * config/riscv/riscv-vector-builtins-types.def (DEF_RVV_XFQF_OPS): (vint8mf8_t): (vint8mf4_t): (vint8mf2_t): (vint8m1_t): (vint8m2_t):

Re: [Patch] C++: reject OpenMP directives in constexpr functions

2024-12-13 Thread Jakub Jelinek
On Fri, Dec 13, 2024 at 01:15:36PM +0100, Tobias Burnus wrote: > OpenMP states for C++: > > "Directives may not appear in constexpr functions or in constant expressions." > > There is some support for this already in GCC, but not for [[omp::decl]]-type > of directives and it also doesn't work tha

[PATCH 2/2] RISC-V: Update Xsfvqmacc and Xsfvfnrclip's testcases

2024-12-13 Thread Jiawei
From: Liao Shihua --- gcc/config/riscv/vector.md| 7 ++- .../riscv/rvv/xsfvector/sf_vfnrclip_x_f_qf.c | 60 ++ .../riscv/rvv/xsfvector/sf_vfnrclip_xu_f_qf.c | 63 ++- .../riscv/rvv/xsfvector/sf_vqmacc_2x8x2.c | 16 + .../riscv/rvv/xsf

[PATCH v3 2/2] RISC-V: Update Xsfvqmacc and Xsfvfnrclip's testcases

2024-12-13 Thread Jiawei
From: Liao Shihua Update Sifive Xsfvqmacc and Xsfvfnrclip extension's testcases. version log: Update synchronize LMUL settings with return type. gcc/ChangeLog: * config/riscv/vector.md: New attr set. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/xsfvector/sf_vfnrcli

[PATCH v3 1/2] RISC-V: Update Xsfvfnrclip implementation.

2024-12-13 Thread Jiawei
Update implementation of Xsfvfnrclip, using return type as iterator. gcc/ChangeLog: * config/riscv/genrvv-type-indexer.cc (expand_floattype): New func. (main): New type. * config/riscv/riscv-vector-builtins-types.def (DEF_RVV_XFQF_OPS): New def. (vint8mf8_t): Ditt

Re: [RFC][PATCH] AArch64: Remove AARCH64_EXTRA_TUNE_USE_NEW_VECTOR_COSTS

2024-12-13 Thread Richard Biener
On Thu, Dec 12, 2024 at 5:27 PM Jennifer Schmitz wrote: > > > > > On 6 Dec 2024, at 08:41, Jennifer Schmitz wrote: > > > > > > > >> On 5 Dec 2024, at 20:07, Richard Sandiford > >> wrote: > >> > >> External email: Use caution opening links or attachments > >> > >> > >> Jennifer Schmitz writes:

[PATCH] RISC-V: optimization by converting to LUI operands with LUI_AFTER_COMMON_LEADING_SHIFT

2024-12-13 Thread Oliver Kozul
The patch optimizes code generation for comparisons of the form X & C1 == C2. When the bitwise AND mask is stored in the lower 20 bits it can be left shifted so it behaves as a LUI operand instead, saving an addi instruction while loading. 2024-12-13 Oliver Kozul   PR target/114087 gcc/Ch

Re: [PATCH] Apply lambda section attributes to static thunks

2024-12-13 Thread Campbell Suter
On 14/12/2024 04:34, Marek Polacek wrote: >> @@ -1376,6 +1377,13 @@ maybe_add_lambda_conv_op (tree type) >>if (generic_lambda_p) >> fn = add_inherited_template_parms (fn, DECL_TI_TEMPLATE (callop)); >> >> + if (lookup_attribute ("section", DECL_ATTRIBUTES (callop))) >> +{ >> +

Re: The COBOL front end, in 8 notes

2024-12-13 Thread Andi Kleen
"James K. Lowden" writes: > The following 8 patches constitute the 80 files needed to build and > document the COBOL front end. They assume that following exist: > > gcc/cobol/ChangeLog > libgcobol/ChangeLog > > The messages are grouped by files in a more or less logical order, > but gro

RE: [PATCH 7/7]AArch64: Implement vector concat of partial SVE vectors

2024-12-13 Thread Tamar Christina
> > ;; 2 element quad vector modes. > > (define_mode_iterator VQ_2E [V2DI V2DF]) > > > > @@ -1678,7 +1686,15 @@ (define_mode_attr VHALF [(V8QI "V4QI") (V16QI > "V8QI") > > (V2DI "DI")(V2SF "SF") > > (V4SF "V2SF") (V4HF "V2HF") > >

Re: [PATCH] vect: Use proper vectype for costing vec_construct [PR118019].

2024-12-13 Thread Robin Dapp
> Iff you want to fix this now before re-architecting how we do costing then > IMO the only sensible way is by adding extra member to slp_tree indicating > the Element Type used. I see, then it might not be worth it - I guess it can wait until GCC 16.

Re: [PATCH] COBOL 8/8 bld: "meta" files, such a gcc/cobol/Make-lang.in

2024-12-13 Thread Marc
Hello James, > gcc/ChangeLog > * common.opt: Add libgcobol module and cobol language. > * dwarf2out.cc: New file. Minor comment while quickly looking at it. But I think the ChangeLog entry for dwarf2out is not correct, as the file already exists. > gcc/cob

Re: [PATCH] COBOL 8/8 bld: "meta" files, such a gcc/cobol/Make-lang.in

2024-12-13 Thread David Malcolm
On Thu, 2024-12-12 at 12:58 -0500, James K. Lowden wrote: [...snip...] > diff --git a/gcc/cobol/lang.opt b/gcc/cobol/lang.opt > new file mode 100644 > index 000..1739dd9fdf3 > --- /dev/null > +++ b/gcc/cobol/lang.opt > @@ -0,0 +1,144 @@ > +; lang.opt -- Options for the gcc Cobol front en

Re: The COBOL front end, in 8 notes

2024-12-13 Thread David Malcolm
On Thu, 2024-12-12 at 12:56 -0500, James K. Lowden wrote: > The following 8 patches constitute the 80 files needed to build and > document the COBOL front end.  They assume that following exist: > >     gcc/cobol/ChangeLog >     libgcobol/ChangeLog > > The messages are grouped by files in a more

[PATCH] vect: Use proper vectype for costing vec_construct [PR118019].

2024-12-13 Thread Robin Dapp
Hi, in VMAT_STRIDED_SLP we're likely to select a different vectype with fewer elements for vector construction. After loading it is re-interpreted as the proper vectype. When checking costs we use the original vectype with more elements leading to wrong costing in case vector construction is depe

Re: [PATCH] vect: Use proper vectype for costing vec_construct [PR118019].

2024-12-13 Thread Richard Biener
> Am 13.12.2024 um 20:49 schrieb Robin Dapp : > > Hi, > > in VMAT_STRIDED_SLP we're likely to select a different vectype with > fewer elements for vector construction. After loading it is > re-interpreted as the proper vectype. > When checking costs we use the original vectype with more elem

Re: [PATCH] c: special-case some "bool" errors with C23 [PR117629]

2024-12-13 Thread Sam James
Sam James writes: > David Malcolm writes: > >> This patch attempts to provide better error messages for >> code compiled with C23 that hasn't been updated for >> "bool", "true", and "false" becoming keywords (based on >> a brief review of the Gentoo bug tracker links given at >> https://gcc.gnu.

Re: [PATCH v2] c++: Disallow decomposition of lambda bases [PR90321]

2024-12-13 Thread Jason Merrill
On 12/13/24 4:49 AM, Nathaniel Shead wrote: On Thu, Nov 21, 2024 at 04:01:02PM -0500, Marek Polacek wrote: On Thu, Nov 07, 2024 at 09:48:52PM +1100, Nathaniel Shead wrote: Bootstrapped and lightly regtested on x86_64-pc-linux-gnu (so far just dg.exp), OK for trunk if full regtest succeeds? --

Re: [RFC][PATCH] AArch64: Remove AARCH64_EXTRA_TUNE_USE_NEW_VECTOR_COSTS

2024-12-13 Thread Jennifer Schmitz
> On 13 Dec 2024, at 13:40, Richard Biener wrote: > > External email: Use caution opening links or attachments > > > On Thu, Dec 12, 2024 at 5:27 PM Jennifer Schmitz wrote: >> >> >> >>> On 6 Dec 2024, at 08:41, Jennifer Schmitz wrote: >>> >>> >>> On 5 Dec 2024, at 20:07, Richard

Re: Should -fsanitize=bounds support counted-by attribute for pointers inside a structure?

2024-12-13 Thread Qing Zhao
> On Dec 12, 2024, at 17:36, Martin Uecker wrote: > > Am Donnerstag, dem 12.12.2024 um 13:59 -0800 schrieb Bill Wendling: >> >> >> So, it’s the correct behavior for the counted_by attribute for FAM based >> on our previous discussion and agreement. > > If it is indee

Re: [PATCH] Apply lambda section attributes to static thunks

2024-12-13 Thread Marek Polacek
On Fri, Dec 13, 2024 at 04:52:58PM +1300, Campbell Suter wrote: > Each lambda that can be converted to a plain function pointer has a > thunk generated for it, which invokes the body of the lambda function. > > When a section attribute is added to a lambda function, it only applies > to the body o

Re: [PATCH] Introduce -flto-partition=locality

2024-12-13 Thread Kyrylo Tkachov
Ping. Thanks, Kyrill > On 28 Nov 2024, at 11:22, Kyrylo Tkachov wrote: > > Ping. > >> On 15 Nov 2024, at 17:04, Kyrylo Tkachov wrote: >> >> Hi all, >> >> This is a patch submission following-up from the RFC at: >> https://gcc.gnu.org/pipermail/gcc/2024-November/245076.html >> The patch is re

[committed] libstdc++: Fix -Wsign-compare warning in

2024-12-13 Thread Jonathan Wakely
libstdc++-v3/ChangeLog: * include/bits/regex.tcc: Fix -Wsign-compare warning. --- Tested x86_64-linux. Pushed to trunk. libstdc++-v3/include/bits/regex.tcc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libstdc++-v3/include/bits/regex.tcc b/libstdc++-v3/include/bit

The COBOL front end, in 8 notes

2024-12-13 Thread James K. Lowden
The following 8 patches constitute the 80 files needed to build and document the COBOL front end. They assume that following exist: gcc/cobol/ChangeLog libgcobol/ChangeLog The messages are grouped by files in a more or less logical order, but groups are somewhat arbitrary. The primary c

Re: [Fortran, Patch, PR117347, v1] Fix array constructor not resolved in associate

2024-12-13 Thread Harald Anlauf
Hi Andre, while the patch works with the reduced testcase, it runs into the newly added gcc_assert() when trying the original testcase in the PR. I also wonder if this use of gcc_assert() is a good idea or good style: + gcc_assert (gfc_resolve_expr (tgt_expr)); Since gcc_assert is a macro

[libstdc++] Optimize string constructors

2024-12-13 Thread Jan Hubicka
Hi, this patch improves code generation on string constructors. We currently have _M_construct which takes as a parameter two iterators (begin/end pointers to other string) and produces new string. This patch adds special case of constructor where instead of begining/end pointers we readily know

[committed] libstdc++: Fix -Wreorder warning in

2024-12-13 Thread Jonathan Wakely
libstdc++-v3/ChangeLog: * include/pstl/parallel_backend_tbb.h (__merge_func): Fix order of mem-initializers. --- Tested x86_64-linux. Pushed to trunk. There are still lots of -Wunknown-pragmas/-Wsign-compare/-Wunused warnings in this header though. libstdc++-v3/include/pstl/par

[PATCH] COBOL 7/8 doc: man pages, for now

2024-12-13 Thread James K. Lowden
>From 64bcb34e12371f61a8958645e1668e0ac2704391doc.patch 4 Oct 2024 12:01:22 >-0400 From: "James K. Lowden" Date: Thu 12 Dec 2024 06:28:05 PM EST Subject: [PATCH] Add 'cobol' to 4 files gcc/cobol/ChangeLog * gcobc: New file. * gcobol.1: New file. * gcobol.3: New file.

[PATCH] COBOL 8/8 bld: "meta" files, such a gcc/cobol/Make-lang.in

2024-12-13 Thread James K. Lowden
>From 64bcb34e12371f61a8958645e1668e0ac2704391bld.patch 4 Oct 2024 12:01:22 >-0400 From: "James K. Lowden" Date: Thu 12 Dec 2024 06:28:06 PM EST Subject: [PATCH] Add 'cobol' to 10 files ChangeLog * Makefile.def: Add libgcobol module and cobol language. * configure: Regenerate.

[committed] libstdc++: Fix -Wmisleading-indentation warning in testcase

2024-12-13 Thread Jonathan Wakely
libstdc++-v3/ChangeLog: * testsuite/26_numerics/random/random_device/entropy.cc: Fix indentation to avoid -Wmisleading-indentation warning. --- Tested x86_64-linux. Pushed to trunk. .../testsuite/26_numerics/random/random_device/entropy.cc | 2 +- 1 file changed, 1 inserti

[committed] libstdc++: Swap expressions in noexcept-specifier of ranges::not_equal_to

2024-12-13 Thread Jonathan Wakely
Although this should never make a difference for sensible code, we should really make the expression in the noexcept-specifier match the expression in the function body. libstdc++-v3/ChangeLog: * include/bits/ranges_cmp.h (not_equal_to): Make order of expressions in noexcept-speci

[committed] libstdc++: Fix uninitialized data in std::basic_spanbuf::seekoff

2024-12-13 Thread Jonathan Wakely
I noticed a -Wmaybe-uninitialized warning for this function, which turns out to be correct. If the caller passes a valid std::ios_base::seekdir value then there's no problem, but if they pass std::seekdir(999) then we don't initialize the __base variable before adding it to __off. Rather than init

[PATCH] libstdc++: Move std::basic_ostream to new internal header

2024-12-13 Thread Jonathan Wakely
This adds so that other headers don't need to include all of , which pulls in all of since C++23 (for the std::print and std::println overloads in ). This new header allows the constrained operator<< in to be defined without all of std::format being compiled. We could also replace with in all

Re: [PATCH v4] arm: [MVE intrinsics] Fix support for predicate constants [PR target/114801]

2024-12-13 Thread Christophe Lyon
On Tue, 10 Dec 2024 at 13:14, Richard Earnshaw (lists) wrote: > > On 09/12/2024 21:11, Christophe Lyon wrote: > > In this PR, we have to handle a case where MVE predicates are supplied > > as a const_int, where individual predicates have illegal boolean > > values (such as 0xc for a 4-bit boolean

[PATCH] cse: Fix up record_jump_equiv checks [PR117095]

2024-12-13 Thread Jakub Jelinek
Hi! The following testcase is miscompiled on s390x-linux with -O2 -march=z15. The problem happens during cse2, which sees in an extended basic block (jump_insn 217 78 216 10 (parallel [ (set (pc) (if_then_else (ne (reg:SI 165) (const_int 1 [0x1])

[PATCH v2] RISC-V: Increase cost for vec_construct [PR118019].

2024-12-13 Thread Robin Dapp
Hi, for a generic vec_construct from scalar elements we need to load each scalar element and move it over to a vector register. Right now we only use a cost of 1 per element. This patch uses register-move cost as well as scalar_to_vec and multiplies it with the number of elements in the vector in

[PATCH 2/2][libstdc++]: Adjust probabilities of hashmap loop conditions

2024-12-13 Thread Tamar Christina
Hi All, We are currently generating a loop which has more comparisons than you'd typically need as the probablities on the small size loop are such that it assumes the likely case is that an element is not found. This again generates a pattern that's harder for branch predictors to follow, but al

[PATCH 1/2][libstdc++]: Add inline keyword to _M_locate

2024-12-13 Thread Tamar Christina
Hi All, In GCC 12 there was a ~40% regression in the performance of hashmap->find. This regression came about accidentally: Before GCC 12 the find function was small enough that IPA would inline it even though it wasn't marked inline. In GCC-12 an optimization was added to perform a linear sear

[PATCH 4/7 v4] lto: Implement ltrans cache

2024-12-13 Thread Michal Jires
On Thu, 2024-12-12 at 15:48:19 +, Jan Hubicka wrote: > fgetc has kind of non-trivial overhead. For non-MMAP systems (is > Windows such?), I think allocating some buffer, say 64K > and doing fread/memcmp is probably better. Ok, changed to fread/memcmp fallback. > Isn't std::string always 0 ter

[PATCH 3/4] libstdc++: Use alias-declarations in bits/hashtable_policy, h

2024-12-13 Thread Jonathan Wakely
This file is only for C++11 and later, so replace typedefs with alias-declarations for clarity. Also remove redundant std:: qualification on size_t, ptrdiff_t etc. We can also remove the result_type, first_argument_type and second_argument_type typedefs from the range hashers. We don't need those

[PATCH 4/4] libstdc++: Initialize all members of hashtable local iterators

2024-12-13 Thread Jonathan Wakely
Currently the _M_bucket members are left uninitialized for default-initialized local iterators, and then copy construction copies indeterminate values. We should just ensure they're initialized on construction. Setting them to zero makes default-initialization consistent with value-initialization

Re: [PATCH] RISC-V: optimization by converting to LUI operands with LUI_AFTER_COMMON_LEADING_SHIFT

2024-12-13 Thread Jeff Law
On 12/13/24 5:42 AM, Oliver Kozul wrote: The patch optimizes code generation for comparisons of the form X & C1 == C2. When the bitwise AND mask is stored in the lower 20 bits it can be left shifted so it behaves as a LUI operand instead, saving an addi instruction while loading. 2024-12-13 

[PATCH] c++: modules: Fix 32-bit overflow with 64-bit location_t [PR117970]

2024-12-13 Thread Lewis Hyatt
Hello- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117970 This fixes one place in module.cc that I missed updating for 64-bit location_t in r15-5616. bootstrap + regtested on x86-64 + aarch64. Also verified that the regression reported on the PR is fixed on that specific configuration. OK to pus

Re: [PATCH] cse: Fix up record_jump_equiv checks [PR117095]

2024-12-13 Thread Jakub Jelinek
On Fri, Dec 13, 2024 at 04:00:38PM -0700, Jeff Law wrote: > On 12/13/24 8:20 AM, Jakub Jelinek wrote: > > The following testcase is miscompiled on s390x-linux with -O2 -march=z15. > > The problem happens during cse2, which sees in an extended basic block > > (jump_insn 217 78 216 10 (parallel [ > >

[PATCH 1/4] libstdc++: Further simplify _Hashtable inheritance hierarchy

2024-12-13 Thread Jonathan Wakely
The main change here is using [[no_unique_address]] instead of the Empty Base-class Optimization. Using the attribute allows us to use data members instead of base-classes. That simplifies the inheritance hierarchy, which means less work for the compiler. It also means that ADL has fewer associated

[PATCH 2/4] libstdc++: Simplify storage of hasher in local iterators

2024-12-13 Thread Jonathan Wakely
The fix for PR libstdc++/56267 (relating to the lifetime of the hash object stored in a local iterator) has undefined behaviour, as it relies on being able to call a member function on an empty object that never started its lifetime. Although the member function probably doesn't care about the empt

[PATCH] openmp: Add support for non-constant iterator parameters in map, to and from clauses

2024-12-13 Thread Kwok Cheung Yeung
This patch builds on the previous patch series implementing OpenMP iterators at: https://gcc.gnu.org/pipermail/gcc-patches/2024-November/670333.html This patch removes the limitation that the lower and upper bounds and strides of the iterator must be compile-time constants - they can now be a

Re: [PATCH 1/2][libstdc++]: Add inline keyword to _M_locate

2024-12-13 Thread Jonathan Wakely
On Fri, 13 Dec 2024 at 17:12, Tamar Christina wrote: > > Hi All, > > In GCC 12 there was a ~40% regression in the performance of hashmap->find. > > This regression came about accidentally: > > Before GCC 12 the find function was small enough that IPA would inline it even > though it wasn't marked

Re: [PATCH 2/2][libstdc++]: Adjust probabilities of hashmap loop conditions

2024-12-13 Thread Jonathan Wakely
On Fri, 13 Dec 2024 at 17:13, Tamar Christina wrote: > > Hi All, > > We are currently generating a loop which has more comparisons than you'd > typically need as the probablities on the small size loop are such that it > assumes the likely case is that an element is not found. > > This again gener

Re: [PATCH 1/2][libstdc++]: Add inline keyword to _M_locate

2024-12-13 Thread Jonathan Wakely
N.B. All libstdc++ patches should be sent to the libstdc++ list (not just to the names in the MAINTAINERS file). On Sat, 14 Dec 2024 at 01:01, Jonathan Wakely wrote: > > On Fri, 13 Dec 2024 at 17:12, Tamar Christina wrote: > > > > Hi All, > > > > In GCC 12 there was a ~40% regression in the perf