Re: [PATCH] AArch64: Add fma_reassoc_width [PR107413]

2022-11-21 Thread Richard Sandiford via Gcc-patches
Wilco Dijkstra writes: > Add a reassocation width for FMAs in per-CPU tuning structures. Keep the > existing setting for cores with 2 FMA pipes, and use 4 for cores with 4 > FMA pipes. This improves SPECFP2017 on Neoverse V1 by ~1.5%. > > Passes regress/bootstrap, OK for commit? > > gcc/ >

Re: [PATCHv2, rs6000] Enable have_cbranchcc4 on rs6000

2022-11-21 Thread HAO CHEN GUI via Gcc-patches
Hi Segher, Thanks for your comments. 在 2022/11/22 7:49, Segher Boessenkool 写道: > *cbranch_2insn is not a machine insn. It generates a cror and a branch > insn. This makes no sense to have in a cbranchcc: those do a branch > based on an existing cr field, so based on the *output* of that cror.

Re: [PATCH] range-op: Implement floating point division fold_range [PR107569]

2022-11-21 Thread Jan-Benedict Glaw
Hi Jakub, On Fri, 2022-11-11 10:09:42 +0100, Jakub Jelinek via Gcc-patches wrote: > Here is the floating point division fold_range implementation, > as I wrote in the last mail, we could outline some of the common parts > into static methods with descriptive names and share them between >

[PATCH] tree-optimization/107766 - ICE with recent -ffp-contract=off fix

2022-11-21 Thread Richard Biener via Gcc-patches
The following uses *node to check for FP types rather than the child nodes which could be constant leafs and thus without a vector type. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR tree-optimization/107766 * tree-vect-slp-patterns.cc

Re: [PATCHv2, rs6000] Enable have_cbranchcc4 on rs6000

2022-11-21 Thread Kewen.Lin via Gcc-patches
Hi Haochen, on 2022/11/22 13:12, HAO CHEN GUI wrote: > Hi Kewen, > > 在 2022/11/22 11:11, Kewen.Lin 写道: >> Maybe we can adjust prepare_cmp_insn to fail if the constructed cbranchcc4 >> pattern doesn't satisfy the predicate of operand 0 rather than to assert. >> It's something like: >> >> if

Re: [PATCHv2, rs6000] Enable have_cbranchcc4 on rs6000

2022-11-21 Thread HAO CHEN GUI via Gcc-patches
Hi Kewen, 在 2022/11/22 11:11, Kewen.Lin 写道: > Maybe we can adjust prepare_cmp_insn to fail if the constructed cbranchcc4 > pattern doesn't satisfy the predicate of operand 0 rather than to assert. > It's something like: > > if (!insn_operand_matches (icode, 0, test)) > goto fail; > > or only

Re: [PATCHv2, rs6000] Enable have_cbranchcc4 on rs6000

2022-11-21 Thread Kewen.Lin via Gcc-patches
Hi Haochen, Thanks for the explanation. on 2022/11/21 14:18, HAO CHEN GUI wrote: > Hi Segher, > > 在 2022/11/18 20:18, Segher Boessenkool 写道: >> I don't think we should pretend we have any conditional jumps the >> machine does not actually have, in cbranchcc4. When would this ever be >> useful?

Re: PING^2 [PATCH] Adjust the symbol for SECTION_LINK_ORDER linked_to section [PR99889]

2022-11-21 Thread Kewen.Lin via Gcc-patches
Hi Richard, Many thanks for your review comments! >>> on 2022/8/24 16:17, Kewen.Lin via Gcc-patches wrote: Hi, As discussed in PR98125, -fpatchable-function-entry with SECTION_LINK_ORDER support doesn't work well on powerpc64 ELFv1 because the filled "Symbol" in

Re: Re: [PATCH] RISC-V: Add RVV registers register spilling

2022-11-21 Thread jiawei
-原始邮件- 发件人: "Jeff Law" 发送时间: 2022-11-21 23:26:37 (星期一) 收件人: "juzhe.zh...@rivai.ai" , schwab 抄送: gcc-patches , "monk.chiang" , "kito.cheng" , jiawei 主题: Re: [PATCH] RISC-V: Add RVV registers register spilling On 11/21/22 02:25, juzhe.zh...@rivai.ai wrote:

[pushed] c++: contracts fixes

2022-11-21 Thread Jason Merrill via Gcc-patches
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- Fixing -Wunused-parm warnings and link errors depending on where -fcontracts appears on the command line. gcc/cp/ChangeLog: * contracts.cc (build_contract_condition_function): Set DECL_ARTIFICIAL on return value parm.

Re: [PATCH] i386: Only enable small loop unrolling in backend [PR 107602]

2022-11-21 Thread Hongtao Liu via Gcc-patches
On Tue, Nov 22, 2022 at 1:41 AM Jeff Law via Gcc-patches wrote: > > > On 11/18/22 23:25, Hongyu Wang via Gcc-patches wrote: > > Hi, > > > > Followed by the discussion in pr107602, -munroll-only-small-loops > > Does not turns on/off -funroll-loops, and current check in > >

Re: [PATCH v4] eliminate mutex in fast path of __register_frame

2022-11-21 Thread Thomas Neumann via Gcc-patches
Hi, When dynamically linking a fast enough machine hides the latency, but when Statically linking or on slower devices this change caused a 5x increase in Instruction count and 2x increase in cycle count before getting to main. I have looked at ways to fix that. The problem is that with

[committed] analyzer: fix ICE on 'bind' with non-pointer arg [P107783]

2022-11-21 Thread David Malcolm via Gcc-patches
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r13-4220-g12a4785c9120be. gcc/analyzer/ChangeLog: PR analyzer/107783 * region-model-impl-calls.cc (kf_accept::matches_call_types_p): Require that args 1 and 2 be pointers.

[committed] analyzer: fix ICE on 'bind' that returns a struct [PR107788]

2022-11-21 Thread David Malcolm via Gcc-patches
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r13-4221-g4e4e45a4fd3411. gcc/analyzer/ChangeLog: PR analyzer/107788 * region-model.cc (region_model::update_for_int_cst_return): Require that the return type be an integer type.

[committed] analyzer: fix ICE on writes to errno [PR107777]

2022-11-21 Thread David Malcolm via Gcc-patches
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r13-4219-g358dab90186b30. gcc/analyzer/ChangeLog: PR analyzer/10 * call-summary.cc (call_summary_replay::convert_region_from_summary_1): Handle RK_THREAD_LOCAL and RK_ERRNO in

[committed] analyzer, testsuite: add more examples taken from CWE

2022-11-21 Thread David Malcolm via Gcc-patches
Successfully tested on x86_64-pc-linux-gnu. Pushed to trunk as r13-4218-g9ada45967b4cf5. gcc/testsuite/ChangeLog: * gcc.dg/analyzer/CWE-131-examples.c: New test. * gcc.dg/analyzer/file-CWE-1341-example.c: New test. * gcc.dg/analyzer/malloc-CWE-401-example.c: New test.

Re: [PATCHv2, rs6000] Enable have_cbranchcc4 on rs6000

2022-11-21 Thread Segher Boessenkool
Hi! On Mon, Nov 21, 2022 at 02:18:39PM +0800, HAO CHEN GUI wrote: > 在 2022/11/18 20:18, Segher Boessenkool 写道: > > I don't think we should pretend we have any conditional jumps the > > machine does not actually have, in cbranchcc4. When would this ever be > > useful? cror;beq can be quite

[PATCH RFA(configure)] c++: provide strchrnul on targets without it [PR107781]

2022-11-21 Thread Jason Merrill via Gcc-patches
Tested x86_64-pc-linux-gnu, and also manually changing the HAVE_DECL_STRCHRNUL flag. OK for trunk? -- 8< -- The Contracts implementation uses strchrnul, which is a glibc extension, so bootstrap broke on non-glibc targets. I considered unconditionally using a local definition, but I guess we

Activate gcc builder problem emails (Was: [PATCH v2] genmultilib: Add sanity check)

2022-11-21 Thread Mark Wielaard
Hi Christophe, On Mon, Nov 21, 2022 at 01:35:34PM +0100, Christophe Lyon wrote: > On 11/21/22 13:32, Mark Wielaard wrote: > > > I've just sent a fix: > > > https://gcc.gnu.org/pipermail/gcc-patches/2022-November/606887.html > > > > > > Hopefully that one is right > > > > The buildbot gcc builds

[PATCH] c++: Fix up -fcontract* options

2022-11-21 Thread Jakub Jelinek via Gcc-patches
Hi! I've noticed +FAIL: compiler driver --help=c++ option(s): "^ +-.*[^:.]\$" absent from output: " -fcontract-build-level=[off|default|audit] Specify max contract level to generate runtime checks for" error, this is due to missing dot at the end of the description. The second part of the

Re: [PATCH 2/2] Fortran: add attribute target_clones

2022-11-21 Thread Bernhard Reutner-Fischer via Gcc-patches
On Mon, 21 Nov 2022 20:13:40 +0100 Mikael Morin wrote: > Hello, > > Le 09/11/2022 à 20:02, Bernhard Reutner-Fischer via Fortran a écrit : > > Hi! > > > > Add support for attribute target_clones: > > !GCC$ ATTRIBUTES target_clones("arch1", "arch3","default") :: mysubroutine > > +/* Internal

[PATCH] Fix autoprofiledbootstrap build

2022-11-21 Thread Eugene Rozenfeld via Gcc-patches
1. Fix gcov version 2. Don't attempt to create an autoprofile file for cc1 since cc1plus (not cc1) is not invoked when building cc1 3. Fix documentation typo Tested on x86_64-pc-linux-gnu. gcc/ChangeLog: * c/Make-lang.in: Don't attempt to create an autoprofile file for cc1 *

[PATCH] Fix count comparison in ipa-cp

2022-11-21 Thread Eugene Rozenfeld via Gcc-patches
The existing comparison was incorrect for non-PRECISE counts (e.g., AFDO): we could end up with a 0 base_count, which could lead to asserts, e.g., in good_cloning_opportunity_p. gcc/ChangeLog: * ipa-cp.cc (ipcp_propagate_stage): Fix profile count comparison. --- gcc/ipa-cp.cc | 2 +- 1

[PATCH] libstdc++: Make chrono::hh_mm_ss more compact

2022-11-21 Thread Jonathan Wakely via Gcc-patches
While finishing the time zone support for C++20, I noticed that the chrono::hh_mm_ss type is surprisingly large: 40 bytes. That's because we use duration for each of the four members, _M_h, _M_m, _M_s and _M_ss. This is very wasteful. The patch below reduces it to 16 bytes (or less for some

Re: [PATCH 1/2] Fortran: Cleanup struct ext_attr_t

2022-11-21 Thread Bernhard Reutner-Fischer via Gcc-patches
On Mon, 21 Nov 2022 12:08:20 +0100 Mikael Morin wrote: > > * gfortran.h (struct ext_attr_t): Remove middle_end_name. > > * trans-decl.cc (add_attributes_to_decl): Move building > > tree_list to ... > > * decl.cc (gfc_match_gcc_attributes): ... here. Add the attribute to > >

Re: [PATCH 2/2] Fortran: Add attribute flatten

2022-11-21 Thread Bernhard Reutner-Fischer via Gcc-patches
On Mon, 21 Nov 2022 12:24:11 +0100 Mikael Morin wrote: > > --- a/gcc/fortran/decl.cc > > +++ b/gcc/fortran/decl.cc > (...) > > @@ -11849,7 +11850,9 @@ gfc_match_gcc_attributes (void) > > if (strcmp (name, ext_attr_list[id].name) == 0) > > break; > > > > - if (id ==

Re: [PATCH 1/2] symtab: also change RTL decl name

2022-11-21 Thread Bernhard Reutner-Fischer via Gcc-patches
On Mon, 21 Nov 2022 20:02:49 +0100 Jan Hubicka wrote: > > Hi Honza, Ping. > > Regtests cleanly for c,fortran,c++,ada,d,go,lto,objc,obj-c++ > > Ok? > > I'd need this for attribute target_clones for the Fortran FE. > Sorry for delay here. > > > void > > > @@ -303,6 +301,10 @@

Re: [PATCH 2/2] Fortran: add attribute target_clones

2022-11-21 Thread Mikael Morin
Hello, Le 09/11/2022 à 20:02, Bernhard Reutner-Fischer via Fortran a écrit : Hi! Add support for attribute target_clones: !GCC$ ATTRIBUTES target_clones("arch1", "arch3","default") :: mysubroutine Bootstrapped and regtested on x86_64-unknown-linux with --target_board=unix'{-m32,-m64}'. OK for

Re: [PATCH 1/2] symtab: also change RTL decl name

2022-11-21 Thread Jan Hubicka via Gcc-patches
> Hi Honza, Ping. > Regtests cleanly for c,fortran,c++,ada,d,go,lto,objc,obj-c++ > Ok? > I'd need this for attribute target_clones for the Fortran FE. Sorry for delay here. > > void > > @@ -303,6 +301,10 @@ symbol_table::change_decl_assembler_name (tree decl, > > tree name) > > warning (0,

[committed] libstdc++: Check static assertions earlier in chrono::duration

2022-11-21 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8-- This ensures that we fail a static assertion before giving any other errors. Instantiating chrono::duration will now print this before the other errors caused by it: error: static assertion failed: period must be a specialization of ratio

[committed] libstdc++: Reduce size of std::bind_front(F) result

2022-11-21 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8-- When there are no bound arguments to a std::bind_front call we don't need the overhead of compiling, initializing, and accessing an empty tuple. libstdc++-v3/ChangeLog: * include/std/functional (_Bind_front0): New class template.

[committed] libstdc++: Improve Doxygen comments in

2022-11-21 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8-- libstdc++-v3/ChangeLog: * include/std/tuple: Add better Doxygen comments. --- libstdc++-v3/include/std/tuple | 28 +++- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/libstdc++-v3/include/std/tuple

Re: [PATCH 1/2] symtab: also change RTL decl name

2022-11-21 Thread Mikael Morin
Hello, Le 17/11/2022 à 09:02, Bernhard Reutner-Fischer via Fortran a écrit : Hi Honza, Ping. Regtests cleanly for c,fortran,c++,ada,d,go,lto,objc,obj-c++ Ok? I'd need this for attribute target_clones for the Fortran FE. thanks, On Wed, 9 Nov 2022 20:02:24 +0100 Bernhard Reutner-Fischer

Re: [PATCH 3/6] libcpp: Fix paste error with unknown pragma after macro expansion

2022-11-21 Thread Jeff Law via Gcc-patches
On 11/4/22 07:44, Lewis Hyatt via Gcc-patches wrote: In directives.cc, do_pragma() contains logic to handle a case such as the new testcase pragma-omp-unknown.c, where an unknown pragma was the result of macro expansion (for pragma namespaces that permit expansion). This no longer works

Re: [PATCH] testsuite: Fix missing EFFECTIVE_TARGETS variable errors

2022-11-21 Thread Jeff Law via Gcc-patches
On 11/15/22 10:02, Maciej W. Rozycki wrote: Permit running vector tests outside `check_vect_support_and_set_flags' environment, removing errors such as: ERROR: gcc.dg/analyzer/torture/pr93350.c -O0 : can't read "EFFECTIVE_TARGETS": no such variable for " dg-require-effective-target 1

Re: [PATCH] Makefile.tpl: pass CXXFLAGS_FOR_BUILD where appropriate

2022-11-21 Thread Jeff Law via Gcc-patches
On 9/9/22 04:10, Ross Burton via Gcc-patches wrote: If CXXFLAGS contains something unsupported by the build CXX, we see build failures (e.g. using -fmacro-prefix-map for the target). Ensure that CXXFLAGS_FOR_BUILD is passed where appropriate so that the correct flags are used. ChangeLog:

Re: [PATCH] 3/19 modula2 front end: gm2 driver files.

2022-11-21 Thread Gaius Mulley via Gcc-patches
Richard Biener writes: [snip] > It feels like most of the above would usually be handled via lang specific > specs rather than open-coded in the driver? Is there a specific reason you > opted for explicit handling here? The last time submitting the patches I perhaps went overboard using

Re: [PATCH] i386: Only enable small loop unrolling in backend [PR 107602]

2022-11-21 Thread Jeff Law via Gcc-patches
On 11/18/22 23:25, Hongyu Wang via Gcc-patches wrote: Hi, Followed by the discussion in pr107602, -munroll-only-small-loops Does not turns on/off -funroll-loops, and current check in pass_rtl_unroll_loops::gate would cause -funroll-loops do not take effect. Revert the change about

Re: [PATCH v4] eliminate mutex in fast path of __register_frame

2022-11-21 Thread H.J. Lu via Gcc-patches
On Mon, Nov 21, 2022 at 3:49 AM Jakub Jelinek via Gcc-patches wrote: > > On Mon, Nov 21, 2022 at 12:22:32PM +0100, Thomas Neumann via Gcc-patches > wrote: > > > When dynamically linking a fast enough machine hides the latency, but when > > > Statically linking or on slower devices this change

Re: [PATCH v3] RISC-V: Replace zero_extendsidi2_shifted with generalized split

2022-11-21 Thread Philipp Tomsich
On Sun, 20 Nov 2022 at 17:38, Jeff Law wrote: > > > On 11/9/22 16:10, Philipp Tomsich wrote: > > The current method of treating shifts of extended values on RISC-V > > frequently causes sequences of 3 shifts, despite the presence of the > > 'zero_extendsidi2_shifted' pattern. > > > > Consider: >

Re: [PATCH] Remove legacy VRP (maybe?)

2022-11-21 Thread Jeff Law via Gcc-patches
On 11/21/22 09:35, Aldy Hernandez via Gcc-patches wrote: I've been playing around with removing the legacy VRP code for the next release. It's a layered onion to get this right, but the first bit is pretty straightforward and may be useful for this release. Basically, it entails removing the

[Ping x4] Re: [PATCH, nvptx, 1/2] Reimplement libgomp barriers for nvptx

2022-11-21 Thread Chung-Lin Tang via Gcc-patches
Ping x4 On 2022/11/8 12:34 AM, Chung-Lin Tang wrote: > Ping x3. > > On 2022/10/31 10:18 PM, Chung-Lin Tang wrote: >> Ping x2. >> >> On 2022/10/17 10:29 PM, Chung-Lin Tang wrote: >>> Ping. >>> >>> On 2022/9/21 3:45 PM, Chung-Lin Tang via Gcc-patches wrote: Hi Tom, I had a patch

Re: [PATCH 5/8] middle-end: Add cltz_complement idiom recognition

2022-11-21 Thread Andrew Carlotti via Gcc-patches
On Mon, Nov 14, 2022 at 04:10:22PM +0100, Richard Biener wrote: > On Fri, Nov 11, 2022 at 7:53 PM Andrew Carlotti via Gcc-patches > wrote: > > > > This recognises patterns of the form: > > while (n) { n >>= 1 } > > > > This patch results in improved (but still suboptimal) codegen: > > > > foo

Re: PING^2 [PATCH] testsuite: Windows paths use \ and not /

2022-11-21 Thread Torbjorn SVENSSON via Gcc-patches
Pushed after off-list approval from Jeff Law. On 2022-11-17 17:44, Torbjorn SVENSSON via Gcc-patches wrote: Hi, Ping, https://gcc.gnu.org/pipermail/gcc-patches/2022-November/604896.html Ok for trunk? Kind regards, Torbjörn On 2022-11-02 19:16, Torbjorn SVENSSON wrote: Hi, Ping,

Re: [PATCH] riscv: implement TARGET_MODE_REP_EXTENDED

2022-11-21 Thread Alexander Monakov via Gcc-patches
On Mon, 21 Nov 2022, Jeff Law wrote: > They're writing assembly code -- in my book that means they'd better have a > pretty good understanding of the architecture, its limitations and quirks. That GCC ties together optimization and inline asm interface via its internal TARGET_MODE_REP_EXTENDED

RE: [PATCH][X86_64] Separate znver4 insn reservations from older znvers

2022-11-21 Thread Alexander Monakov via Gcc-patches
On Mon, 21 Nov 2022, Joshi, Tejas Sanjay wrote: > I have addressed all your comments in the patch attached here. I have also > used znver4-direct for avx512 insns. Thanks. > * This patch increased the insn-automata.cc size from 201502 to 214902. Assuming it's the number of lines of code, I

Re: [PATCH] RISC-V: Add RVV registers register spilling

2022-11-21 Thread Jeff Law via Gcc-patches
On 11/21/22 02:25, juzhe.zh...@rivai.ai wrote: https://gcc.gnu.org/pipermail/gcc-patches/2022-November/606523.html This patch obviously didn't include scalable size frame. So it ICE in offset = cfun->machine->frame.gp_sp_offset.to_constant (); We can't directly use to_constant if the frame is a

Re: [PATCH 2/2] Add a new warning option -Wstrict-flex-arrays.

2022-11-21 Thread Qing Zhao via Gcc-patches
> On Nov 18, 2022, at 11:31 AM, Kees Cook wrote: > > On Fri, Nov 18, 2022 at 03:19:07PM +, Qing Zhao wrote: >> Hi, Richard, >> >> Honestly, it’s very hard for me to decide what’s the best way to handle the >> interaction >> between -fstrict-flex-array=M and -Warray-bounds=N. >> >>

Re: [Patch] gcn: Add __builtin_gcn_{get_stack_limit,first_call_this_thread_p}

2022-11-21 Thread Stubbs, Andrew via Gcc-patches
On 21/11/2022 13:41, Tobias Burnus wrote: On 19.11.22 11:46, Tobias Burnus wrote: +   stacklimit = stackbase + seg_size*64; (this should be '*seg_size' not 'seg_size' and the name should be s/seg_size/seg_size_ptr/.) I have updated the comment and ... (Reading it, I think it should be

Re: [PATCH 1/2] Allow subtarget customization of CC1_SPEC

2022-11-21 Thread Jeff Law via Gcc-patches
On 11/21/22 00:26, Sebastian Huber wrote: On 20/11/2022 17:57, Jeff Law wrote: On 10/26/22 03:34, Sebastian Huber wrote: On 04/10/2022 11:47, Sebastian Huber wrote: On 08/09/2022 07:33, Sebastian Huber wrote: On 04/08/2022 15:02, Sebastian Huber wrote: On 22/07/2022 15:02, Sebastian

Re: [PATCH] riscv: implement TARGET_MODE_REP_EXTENDED

2022-11-21 Thread Jeff Law via Gcc-patches
On 11/21/22 06:49, Alexander Monakov wrote: On Sun, 20 Nov 2022, Jeff Law wrote: The concern, as far as I understand would be the case where the assembly-sequence leaves an incompatible extension in the register. Right.  The question in my mind is whether or not the responsibility should be

Re: [PATCH 10/35] arm: improve tests for vabavq*

2022-11-21 Thread Andrea Corallo via Gcc-patches
Kyrylo Tkachov writes: >> -Original Message- >> From: Andrea Corallo >> Sent: Thursday, November 17, 2022 4:38 PM >> To: gcc-patches@gcc.gnu.org >> Cc: Kyrylo Tkachov ; Richard Earnshaw >> ; Andrea Corallo >> Subject: [PATCH 10/35] arm: improve tests for vabavq* >> >>

Re: [PATCH v2] tree-object-size: Support strndup and strdup

2022-11-21 Thread Siddhesh Poyarekar
On 2022-11-20 10:42, Jeff Law wrote: On 11/4/22 06:48, Siddhesh Poyarekar wrote: Use string length of input to strdup to determine the usable size of the resulting object.  Avoid doing the same for strndup since there's a chance that the input may be too large, resulting in an unnecessary

Re: [PATCH] genmultilib: Fix sanity check

2022-11-21 Thread Jeff Law via Gcc-patches
On 11/21/22 05:20, Christophe Lyon via Gcc-patches wrote: On 11/21/22 13:17, Jakub Jelinek wrote: On Mon, Nov 21, 2022 at 12:59:15PM +0100, Christophe Lyon wrote: My previous patch to add a sanity check to genmultilib actually checked the number of dirnames with the number of "sets of

Re: PING^2 [PATCH] Adjust the symbol for SECTION_LINK_ORDER linked_to section [PR99889]

2022-11-21 Thread Richard Sandiford via Gcc-patches
"Kewen.Lin" writes: > Hi, > > Gentle ping: https://gcc.gnu.org/pipermail/gcc-patches/2022-August/600190.html > > Any comments are highly appreciated. > > BR, > Kewen > > on 2022/9/28 13:41, Kewen.Lin via Gcc-patches wrote: >> Hi, >> >> Gentle ping: >>

Re: [Patch] libgomp/gcn: fix/improve struct output (was: [Patch] libgomp/gcn: Prepare for reverse-offload callback handling)

2022-11-21 Thread Andrew Stubbs
On 21/11/2022 13:40, Tobias Burnus wrote: Working on the builtins, I realized that I mixed up (again) bits and byes. While 'uint64_t var[2]' has a size of 128 bits, 'char var[128]' has a size of 128 bytes. Thus, there is sufficient space for 16 pointer-size/uin64_t values but I only need 6.

[PATCH 15/35] arm: Explicitly specify other float types for _Generic overloading [PR107515]

2022-11-21 Thread Stam Markianos-Wright via Gcc-patches
On 11/20/22 22:49, Ramana Radhakrishnan wrote: On Fri, Nov 18, 2022 at 4:59 PM Kyrylo Tkachov via Gcc-patches wrote: -Original Message- From: Andrea Corallo Sent: Thursday, November 17, 2022 4:38 PM To: gcc-patches@gcc.gnu.org Cc: Kyrylo Tkachov ; Richard Earnshaw ; Stam

Re: [PATCH RFC] c++: implement P1492 contracts

2022-11-21 Thread David Edelsohn via Gcc-patches
This patch broke bootstrap on AIX due to its use of strchrnul(). It is an extension available in Linux, but not all targets. /src/src/gcc/cp/contracts.cc:213:21: error: 'strchrnul' was not declared in this scope; did you mean 'strchr'? 213 | size_t role_len = strchrnul (role, ':') - role;

Re: [PATCH] riscv: implement TARGET_MODE_REP_EXTENDED

2022-11-21 Thread Alexander Monakov via Gcc-patches
On Sun, 20 Nov 2022, Jeff Law wrote: > > The concern, as far as I understand would be the case where the > > assembly-sequence leaves an incompatible extension in the register. > > Right.  The question in my mind is whether or not the responsibility should be > on the compiler or on the

Re: [Patch] gcn: Add __builtin_gcn_{get_stack_limit,first_call_this_thread_p}

2022-11-21 Thread Tobias Burnus
0x92 .byte 0x2f .byte 0 .byte 0x8 .byte 0x20 .byte 0x24 .byte 0x92 .byte 0x2e .byte 0 .byte 0x22 .byte 0x38 .byte 0x1c .align 8 .LEFDE0: .LSFDE2: .4byte .LEFDE2-.LASFDE2 .LA

[Patch] libgomp/gcn: fix/improve struct output (was: [Patch] libgomp/gcn: Prepare for reverse-offload callback handling)

2022-11-21 Thread Tobias Burnus
Working on the builtins, I realized that I mixed up (again) bits and byes. While 'uint64_t var[2]' has a size of 128 bits, 'char var[128]' has a size of 128 bytes. Thus, there is sufficient space for 16 pointer-size/uin64_t values but I only need 6. This patch now makes use of the available

Re: PING^1 [PATCH] cpp/remap: Only override if string matched

2022-11-21 Thread Torbjorn SVENSSON via Gcc-patches
Hi, On 2022-11-20 21:31, Jeff Law wrote: On 11/2/22 12:21, Torbjorn SVENSSON via Gcc-patches wrote: Hi, Ping, https://gcc.gnu.org/pipermail/gcc-patches/2022-October/604062.html Ok for trunk? OK.  Sorry for the delay. Thanks for the review. Pushed. Kind regards, Torbjörn jeff

Re: [PATCH v2] genmultilib: Add sanity check

2022-11-21 Thread Christophe Lyon via Gcc-patches
On 11/21/22 13:32, Mark Wielaard wrote: Hi Christophe, On Mon, 2022-11-21 at 13:12 +0100, Christophe Lyon wrote: On 11/21/22 11:16, Mark Wielaard wrote: On Fri, Nov 18, 2022 at 12:42:10PM -0700, Jeff Law wrote: * genmultilib: Add sanity check. OK. It should be interesting to see

Re: [PATCH v2] genmultilib: Add sanity check

2022-11-21 Thread Mark Wielaard
Hi Christophe, On Mon, 2022-11-21 at 13:12 +0100, Christophe Lyon wrote: > On 11/21/22 11:16, Mark Wielaard wrote: > > On Fri, Nov 18, 2022 at 12:42:10PM -0700, Jeff Law wrote: > > > > * genmultilib: Add sanity check. > > > > > > OK. It should be interesting to see if it trips. > > > >

Re: [PATCH] genmultilib: Fix sanity check

2022-11-21 Thread Christophe Lyon via Gcc-patches
On 11/21/22 13:17, Jakub Jelinek wrote: On Mon, Nov 21, 2022 at 12:59:15PM +0100, Christophe Lyon wrote: My previous patch to add a sanity check to genmultilib actually checked the number of dirnames with the number of "sets of options" rather than the number of options, thus breaking the

Re: [PATCH 2/2] aarch64: Add support for widening LDAPR instructions

2022-11-21 Thread Richard Sandiford via Gcc-patches
"Andre Vieira (lists)" writes: > Sorry for the late reply on this. I was wondering though why the check > made sense. The way I see it, SI -> SI mode is either wrong or useless. > So why not: > if it is wrong, error (gcc_assert?) so we know it was generated wrongly > somehow and fix it; > if

Re: [PATCH] genmultilib: Fix sanity check

2022-11-21 Thread Jakub Jelinek via Gcc-patches
On Mon, Nov 21, 2022 at 12:59:15PM +0100, Christophe Lyon wrote: > My previous patch to add a sanity check to genmultilib actually > checked the number of dirnames with the number of "sets of options" > rather than the number of options, thus breaking the build on some > targets. > > To avoid

Re: [PATCH v2] genmultilib: Add sanity check

2022-11-21 Thread Christophe Lyon via Gcc-patches
On 11/21/22 11:16, Mark Wielaard wrote: Hi, On Fri, Nov 18, 2022 at 12:42:10PM -0700, Jeff Law wrote: * genmultilib: Add sanity check. OK.� It should be interesting to see if it trips. It trips up various buildbot setups: https://builder.sourceware.org/buildbot/#/changes/13720

[PATCH] genmultilib: Fix sanity check

2022-11-21 Thread Christophe Lyon via Gcc-patches
My previous patch to add a sanity check to genmultilib actually checked the number of dirnames with the number of "sets of options" rather than the number of options, thus breaking the build on some targets. To avoid duplicating once more the loop that constructs the sed patterns, this patch

[PR107786 PATCH COMMITTED] RISC-V: Fix ICE in branch_shiftedarith_equals_zero

2022-11-21 Thread Philipp Tomsich
With the recent improvements to the splitting of special cases of branch patterns on RISC-V, a dependency on an unmerged/in-discussion change for branch-equals-zero slipped in: this allowed a non-X mode to be presented to branch-equals-zero (where only X mode is permissible). This addresses the

Re: [PATCH v4] eliminate mutex in fast path of __register_frame

2022-11-21 Thread Thomas Neumann via Gcc-patches
It's easy to reproduce on x86 as well. As a testcase: #include int main(int argc, char** argv) { return 0; } And just compile with: g++ -O1 hello.cpp -static -o hello.exe. thanks, I will take a look. Best Thomas

RE: [PATCH v4] eliminate mutex in fast path of __register_frame

2022-11-21 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Thomas Neumann > Sent: Monday, November 21, 2022 11:23 AM > To: Tamar Christina ; gcc-patches@gcc.gnu.org; > Jason Merrill > Cc: Florian Weimer ; Jakub Jelinek > ; Jonathan Wakely > Subject: Re: [PATCH v4] eliminate mutex in fast path of __register_frame >

Re: [PATCH v4] eliminate mutex in fast path of __register_frame

2022-11-21 Thread Jakub Jelinek via Gcc-patches
On Mon, Nov 21, 2022 at 12:22:32PM +0100, Thomas Neumann via Gcc-patches wrote: > > When dynamically linking a fast enough machine hides the latency, but when > > Statically linking or on slower devices this change caused a 5x increase in > > Instruction count and 2x increase in cycle count before

RE: [PATCH][X86_64] Separate znver4 insn reservations from older znvers

2022-11-21 Thread Joshi, Tejas Sanjay via Gcc-patches
[Public] Hi, > I think instead of (znver4-fpu)*2 there should be > > znver4-fpu0*2|znver4-fpu1*2|znver4-fpu2*2|znver4-fpu3*2 > > assuming the instruction occupies the same pipe on both cycles (your variant > models as if it can move from one pipe to another). > Also I think it's better to

Re: [PATCH 2/2] Fortran: Add attribute flatten

2022-11-21 Thread Mikael Morin
Le 10/11/2022 à 11:20, Bernhard Reutner-Fischer via Fortran a écrit : Bootstrapped and regtested cleanly on x86_unknown-linux. The document bits will be rewritten for rst. Ok for trunk if the prerequisite target_clones patch is approved? gcc/fortran/ChangeLog: * decl.cc

Re: [PATCH v4] eliminate mutex in fast path of __register_frame

2022-11-21 Thread Thomas Neumann via Gcc-patches
Hi, When dynamically linking a fast enough machine hides the latency, but when Statically linking or on slower devices this change caused a 5x increase in Instruction count and 2x increase in cycle count before getting to main. This has been quite noticeable on smaller devices. Is there a

RE: [PATCH v4] eliminate mutex in fast path of __register_frame

2022-11-21 Thread Tamar Christina via Gcc-patches
Hi, I couldn't find a Bugzilla account for you Thomas, I've bisected a slowdown in startup speed for C++ to this change, See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107675 When dynamically linking a fast enough machine hides the latency, but when Statically linking or on slower devices

Re: [PATCH 1/2] Fortran: Cleanup struct ext_attr_t

2022-11-21 Thread Mikael Morin
Hello, Le 10/11/2022 à 11:20, Bernhard Reutner-Fischer via Fortran a écrit : Tiny cleanup opportunity since we now have ext_attr_args in struct symbol_attribute. Bootstrapped and regtested on x86_64-unknown-linux with no new regressions. Ok for trunk if the prerequisite was approved ([PATCH

Re: [PATCH 15/35] arm: Explicitly specify other float types for _Generic overloading [PR107515]

2022-11-21 Thread Stam Markianos-Wright via Gcc-patches
On 11/18/22 16:58, Kyrylo Tkachov wrote: -Original Message- From: Andrea Corallo Sent: Thursday, November 17, 2022 4:38 PM To: gcc-patches@gcc.gnu.org Cc: Kyrylo Tkachov ; Richard Earnshaw ; Stam Markianos-Wright Subject: [PATCH 15/35] arm: Explicitly specify other float types for

Re: [PATCH 13/35] arm: further fix overloading of MVE vaddq[_m]_n intrinsic

2022-11-21 Thread Stam Markianos-Wright via Gcc-patches
On 11/18/22 16:49, Kyrylo Tkachov wrote: -Original Message- From: Andrea Corallo Sent: Thursday, November 17, 2022 4:38 PM To: gcc-patches@gcc.gnu.org Cc: Kyrylo Tkachov ; Richard Earnshaw ; Stam Markianos-Wright Subject: [PATCH 13/35] arm: further fix overloading of MVE

[PATCH] maintainer-scripts: Add gdc to update_web_docs_git

2022-11-21 Thread Iain Buclaw via Gcc-patches
Hi, This patch adds gdc to maintainer-scripts/update_web_docs_git so that it's built and uploaded to gcc.gnu.org/onlinedocs. One half of re-adding the gdc docs that were taken down after the revert to the Sphinx conversion. OK? Regards, Iain. --- PR web/107749

Re: [PATCH v2] genmultilib: Add sanity check

2022-11-21 Thread Mark Wielaard
Hi, On Fri, Nov 18, 2022 at 12:42:10PM -0700, Jeff Law wrote: > > * genmultilib: Add sanity check. > > OK.  It should be interesting to see if it trips. It trips up various buildbot setups: https://builder.sourceware.org/buildbot/#/changes/13720 Error calling ../../gcc/gcc/genmultilib:

[COMMITTED] ada: Order pragmas alphabetically in reference manual

2022-11-21 Thread Marc Poulhiès via Gcc-patches
From: Ronan Desplanques gcc/ada/ * doc/gnat_rm/implementation_defined_pragmas.rst: Restore alphabetical ordering. * gnat_rm.texi: Regenerate. * gnat_ugn.texi: Regenerate. Tested on x86_64-pc-linux-gnu, committed on master. ---

[COMMITTED] ada: Internal compiler error for Sequential Partition_Elaboration_Policy

2022-11-21 Thread Marc Poulhiès via Gcc-patches
From: Steve Baird In some cases, compilation of a function with a limited class-wide result type could fail with an internal error if a Sequential Partition_Elaboration_Policy is specified. To prevent this, we want specifying a Sequential Partition_Elaboration_Policy to have the side effect of

[COMMITTED] ada: Small cleanup in Expand_N_Object_Declaration

2022-11-21 Thread Marc Poulhiès via Gcc-patches
From: Eric Botcazou This reuses a local constant more consistently, removes a duplicate of this local constant, renames local variables, alphabetizes declarations, makes a few consistency tweaks and adjusts a couple of comments. No functional changes. gcc/ada/ * exp_ch3.adb

[COMMITTED] ada: Adjust recent change for returns involving function calls

2022-11-21 Thread Marc Poulhiès via Gcc-patches
From: Eric Botcazou gcc/ada/ * gcc-interface/decl.cc (gnat_to_gnu_entity) : Revert latest change. * gcc-interface/trans.cc (gnat_to_gnu) : Tweak latest change. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/gcc-interface/decl.cc | 11

[COMMITTED] ada: Move warnings switches

2022-11-21 Thread Marc Poulhiès via Gcc-patches
From: Bob Duff This patch moves warning switches from Opt into Warnsw, fixes some minor discrepancies, and cleans up the code. No change in behavior. gcc/ada/ * warnsw.ads, warnsw.adb: Move warning flags here from package Opt. Rename Warning_Record to be Warnings_State. Use an

Re: [PATCH] RISC-V: Optimise adding a (larger than simm12) constant

2022-11-21 Thread Philipp Tomsich
On Mon, 21 Nov 2022 at 04:11, Kito Cheng wrote: > > > @@ -464,6 +464,60 @@ > >[(set_attr "type" "arith") > > (set_attr "mode" "DI")]) > > > > +(define_expand "add3" > > + [(set (match_operand:GPR 0 "register_operand" "=r,r") > > + (plus:GPR (match_operand:GPR 1

[COMMITTED] ada: Disable subprogram call validation in CodePeer mode

2022-11-21 Thread Marc Poulhiès via Gcc-patches
From: Ghjuvan Lacambre CodePeer builds with assertions enabled started failing when this validation was introduced. We temporarily disable this validation for CodePeer in order to buy time before fixing the underlying issue. gcc/ada/ * frontend.adb (Frontend): Disable subprogram call

[COMMITTED] ada: Minor tweak in assertion

2022-11-21 Thread Marc Poulhiès via Gcc-patches
From: Eric Botcazou For an array subtype, being definite is the same as being constrained. gcc/ada/ * sem_util.adb (Needs_Secondary_Stack): Test Is_Constrained directly instead of Is_Definite_Subtype for an array subtype. Tested on x86_64-pc-linux-gnu, committed on master.

[COMMITTED] ada: Do not share Packed Array Type if sizes of types differ

2022-11-21 Thread Marc Poulhiès via Gcc-patches
If a subtype has a Size attribute value different than the size of its ancestor, then the Packed Array Type can't be shared and a new one must be created. gcc/ada/ * exp_pakd.adb (Create_Packed_Array_Impl_Type): Do not share PAT if sizes of types differ. Tested on

[COMMITTED] ada: Reject nonconfirming Size attribute value for aliased object

2022-11-21 Thread Marc Poulhiès via Gcc-patches
Only confirming Size must be supported for aliased object of elementary type (see RM 13.1 in the "Implementation Advice"). -- size is 1-byte type Y is range 0 .. 20; type Ay is access all Y; -- Var size is 8-bytes Var : aliased Y := 5 with Size => 64; -- JP.all is a 1-byte

[COMMITTED] ada: Improve documentation for -gnatw.h warnings

2022-11-21 Thread Marc Poulhiès via Gcc-patches
From: Steve Baird The -gnatw.h option enables warnings about "gaps" in record layout specifications. In the case of a "partial" layout specification, where the locations of some components are left unspecified, the resulting warnings may be incomplete or incorrect. Document this implementation

[COMMITTED] ada: Ada 2022 Image attribute bugs

2022-11-21 Thread Marc Poulhiès via Gcc-patches
From: Steve Baird Two issues. First, the two procedures Ada.Strings.Text_Buffers.Output_Mapping.[Wide_]Wide_Put each correctly call Encode, but that call was missing from the corresponding Put procedure. Second, if a record type contains an array-valued Data component as well as both a

[COMMITTED] ada: Fix gnatmake's parsing of adc files

2022-11-21 Thread Marc Poulhiès via Gcc-patches
From: Ronan Desplanques Before this patch, gnatmake's parser for adc files failed to ignore semicolons located inside comments. This patch fixes that behavior. gcc/ada/ * sfn_scan.adb (Scan_SFN_Pragmas): Improve handling of comments. Tested on x86_64-pc-linux-gnu, committed on master.

[COMMITTED] ada: Tweak error messages on misplaced with keywords

2022-11-21 Thread Marc Poulhiès via Gcc-patches
From: Ronan Desplanques Before this patch, with clauses placed in declarative sections were interpreted by the compiler as incorrect aspect specifications, which led to confusing error messages. This patch makes it so more syntax errors involving the with keyword are diagnosed as intended with

Re: [PATCH][PING][sanitizer/106558] asan: fix unsafe optimization of Asan checks.

2022-11-21 Thread Jakub Jelinek via Gcc-patches
On Mon, Nov 21, 2022 at 12:57:15PM +0300, Yuri Gribov wrote: > From 4729f2db3f1b6b40ef0124e4a645788d7f66f426 Mon Sep 17 00:00:00 2001 > From: Yuri Gribov > Date: Sun, 14 Aug 2022 08:42:44 +0300 > Subject: [PATCH] asan: fix unsafe optimization of Asan checks. > > gcc/ > PR

[PATCH][PING][sanitizer/106558] asan: fix unsafe optimization of Asan checks.

2022-11-21 Thread Yuri Gribov via Gcc-patches
Hi, This patch fixes incorrect Asan optimization in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106558 . It successfully passes bootstrap-asan, regular bootstrap and regression testing (on x86/amd64). With this patch number of optimizations has reduced only slightly (146062 -> 145824 on

[r13-4180 Regression] FAIL: g++.dg/other/pr39060.C -std=c++14 (test for excess errors) on Linux/x86_64

2022-11-21 Thread haochen.jiang via Gcc-patches
On Linux/x86_64, 183db4fb73a64bc4641604c30cdbbd9d9e8a6ed6 is the first bad commit commit 183db4fb73a64bc4641604c30cdbbd9d9e8a6ed6 Author: liuhongt Date: Thu Nov 17 16:19:31 2022 +0800 define builtins for "shared" avxneconvert-avx512bf16vl builtins. caused FAIL: g++.dg/other/pr39060.C

Re: [PATCH] changelog: Fix extra space after tab. fix extra spaces after tab

2022-11-21 Thread Martin Liška
On 11/21/22 10:23, Andreas Schwab wrote: > That should be refilled, every file entry on one line. Sure, please send a patch for it. Martin

  1   2   >