Re: [PATCH] Fix incorrect computation in fill_always_executed_in_1

2021-08-16 Thread Xionghu Luo via Gcc-patches
On 2021/8/17 13:17, Xionghu Luo via Gcc-patches wrote: Hi, On 2021/8/16 19:46, Richard Biener wrote: On Mon, 16 Aug 2021, Xiong Hu Luo wrote: It seems to me that ALWAYS_EXECUTED_IN is not computed correctly for nested loops.  inn_loop is updated to inner loop, so it need be restored when

Re: [PATCH] Fix incorrect computation in fill_always_executed_in_1

2021-08-16 Thread Xionghu Luo via Gcc-patches
Hi, On 2021/8/16 19:46, Richard Biener wrote: On Mon, 16 Aug 2021, Xiong Hu Luo wrote: It seems to me that ALWAYS_EXECUTED_IN is not computed correctly for nested loops. inn_loop is updated to inner loop, so it need be restored when exiting from innermost loop. With this patch, the store

Re: [PATCH] c++: fix -fsanitize-coverage=trace-pc ICE [PR101331]

2021-08-16 Thread Jeff Law via Gcc-patches
On 8/13/2021 2:05 AM, Martin Liška wrote: Return content of flag_sanitize_coverage when fn is null. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin PR c++/101331 gcc/ChangeLog: * asan.h (sanitize_coverage_p): Handle

[committed] Improve SImode shifts for H8

2021-08-16 Thread Jeff Law via Gcc-patches
Similar to the H8/300H patch, this improves SImode shifts for the H8/S.  It's not as big a win on the H8/S since we can shift two positions at a time.  But that also means that we can handle more residuals with minimal code growth after a special shift-by-16 or shift-by-24 sequence. I think

[committed] Drop embedded stabs from rl78-elf port

2021-08-16 Thread Jeff Law via Gcc-patches
So rl78-elf started failing various stabs tests a few days ago in my tester with a linker/assembler error. Given the plan to drop embedded stabs, I didn't bother to debug the failure and instead just killed embedded stabs for the rl78 port, which was trivial to do. Committed to the trunk

[PATCH] more warning code refactoring

2021-08-16 Thread Martin Sebor via Gcc-patches
The attached patch continues with the move of warning code from builtins.c and calls.c into a more suitable home. As before, it is mostly free of functional changes. The one exception is that as pleasant a side-effect, moving the attribute access checking from initialize_argument_information()

Re: [PATCH 4/6] Support -fexcess-precision=16 which will enable FLT_EVAL_METHOD_PROMOTE_TO_FLOAT16 when backend supports _Float16.

2021-08-16 Thread Hongtao Liu via Gcc-patches
On Fri, Aug 6, 2021 at 2:06 PM Hongtao Liu wrote: > > On Tue, Aug 3, 2021 at 10:44 AM Hongtao Liu wrote: > > > > On Tue, Aug 3, 2021 at 3:34 AM Joseph Myers wrote: > > > > > > On Mon, 2 Aug 2021, liuhongt via Gcc-patches wrote: > > > > > > > diff --git a/gcc/config/i386/i386.c

Re: [PATCH] Make sure we're playing with integral modes before call extract_integral_bit_field.

2021-08-16 Thread Hongtao Liu via Gcc-patches
On Mon, Aug 9, 2021 at 4:34 PM Hongtao Liu wrote: > > On Fri, Aug 6, 2021 at 7:27 PM Richard Biener via Gcc-patches > wrote: > > > > On Fri, Aug 6, 2021 at 11:05 AM Richard Sandiford > > wrote: > > > > > > Richard Biener via Gcc-patches writes: > > > > On Fri, Aug 6, 2021 at 5:32 AM liuhongt

Re: [PATCH] [i386] Optimize __builtin_shuffle_vector.

2021-08-16 Thread Hongtao Liu via Gcc-patches
On Mon, Aug 16, 2021 at 3:25 PM Hongtao Liu wrote: > > On Mon, Aug 16, 2021 at 3:11 PM Jakub Jelinek via Gcc-patches > wrote: > > > > On Mon, Aug 16, 2021 at 01:18:38PM +0800, liuhongt via Gcc-patches wrote: > > > + /* Accept VNxHImode and VNxQImode now. */ > > > + if (!TARGET_AVX512VL &&

Re: [PATCH] c++: Add C++20 #__VA_OPT__ support

2021-08-16 Thread Jason Merrill via Gcc-patches
On 7/15/21 1:52 PM, Jakub Jelinek wrote: Hi! The following patch implements C++20 # __VA_OPT__ (...) support. Testcases cover what I came up with myself and what LLVM has for #__VA_OPT__ in its testsuite and the string literals are identical between the two compilers on the va-opt-5.c testcase.

Re: [PATCH] libcpp, v2: Implement C++23 P1949R7 - C++ Identifier Syntax using Unicode Standard Annex 31

2021-08-16 Thread Jason Merrill via Gcc-patches
On 8/16/21 4:51 PM, Jakub Jelinek wrote: On Mon, Aug 16, 2021 at 04:21:00PM -0400, Jason Merrill wrote: I see for the UTF-8 chars we have: switch (ucn_valid_in_identifier (pfile, *cp, nst)) { case 0: /* In C++, this is an error for invalid character in an

Re: [PATCH 1/2] analyzer: detect and analyze calls via function pointer (GSoC)

2021-08-16 Thread David Malcolm via Gcc-patches
On Mon, 2021-08-16 at 22:27 +0530, Ankur Saini wrote: > > Thanks for the review > > > On 16-Aug-2021, at 4:48 AM, David Malcolm > > wrote: > > > > Thanks, this is looking promising.  Has this been rebased recently > > (e.g. since I merged > >  

Re: [PATCH] libcpp: __VA_OPT__ p1042r1 placemarker changes [PR101488]

2021-08-16 Thread Jason Merrill via Gcc-patches
On 7/20/21 5:50 AM, Jakub Jelinek wrote: Hi! So, besides missing #__VA_OPT__ patch for which I've posted patch last week, P1042R1 introduced some placemarker changes for __VA_OPT__, most notably the addition of before "removal of placemarker tokens," rescanning ... and the #define H4(X, ...)

Re: [PATCH] libcpp, v2: Implement C++23 P1949R7 - C++ Identifier Syntax using Unicode Standard Annex 31

2021-08-16 Thread Jakub Jelinek via Gcc-patches
On Mon, Aug 16, 2021 at 04:21:00PM -0400, Jason Merrill wrote: > > I see for the UTF-8 chars we have: > >switch (ucn_valid_in_identifier (pfile, *cp, nst)) > > { > > case 0: > >/* In C++, this is an error for invalid character in an > > identifier > >

RE: [PATCH] [MIPS] Hazard barrier return support

2021-08-16 Thread Dragan Mladjenovic via Gcc-patches
> -Original Message- > From: Andrew Pinski [mailto:pins...@gmail.com] > Sent: 16 August 2021 21:17 > To: Dragan Mladjenovic > Cc: gcc-patches@gcc.gnu.org > Subject: Re: [PATCH] [MIPS] Hazard barrier return support > > On Mon, Aug 16, 2021 at 7:43 AM Dragan Mladjenovic via Gcc-patches

Re: 'hash_map>'

2021-08-16 Thread Martin Sebor via Gcc-patches
On 8/16/21 6:44 AM, Thomas Schwinge wrote: Hi! On 2021-08-12T17:15:44-0600, Martin Sebor via Gcc wrote: On 8/6/21 10:57 AM, Thomas Schwinge wrote: So I'm trying to do some C++... ;-) Given: /* A map from SSA names or var decls to record fields. */ typedef hash_map

Re: [PATCH] c++: ignore explicit dguides during NTTP CTAD [PR101883]

2021-08-16 Thread Jason Merrill via Gcc-patches
On 8/16/21 3:06 PM, Patrick Palka wrote: Since (template) argument passing is a copy-initialization context, we mustn't consider explicit deduction guides when deducing a CTAD placeholder type of an NTTP. Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk/11? OK.

Re: [PATCH] c++: aggregate CTAD and brace elision [PR101344]

2021-08-16 Thread Jason Merrill via Gcc-patches
On 8/16/21 3:06 PM, Patrick Palka wrote: During aggregate CTAD, collect_ctor_idx_types always recurses into a sub-CONSTRUCTOR, regardless of whether the corresponding pair of braces was elided in the original initializer. This causes us to reject some completely-braced forms of aggregate CTAD

Re: [PATCH] RISC-V: Enable overlap-by-pieces in case of fast unaliged access

2021-08-16 Thread Palmer Dabbelt
On Mon, 16 Aug 2021 11:56:05 PDT (-0700), pins...@gmail.com wrote: On Mon, Aug 16, 2021 at 10:10 AM Palmer Dabbelt wrote: On Mon, 16 Aug 2021 09:29:16 PDT (-0700), Kito Cheng wrote: >> > Could you submit v3 patch which is v1 with overlap_op_by_pieces field, >> > testcase from v2 and add a few

Re: [PATCH] c++, v2: Implement P0466R5 __cpp_lib_is_layout_compatible compiler helpers [PR101539]

2021-08-16 Thread Jason Merrill via Gcc-patches
On 8/12/21 1:07 PM, Jakub Jelinek wrote: On Thu, Aug 12, 2021 at 12:06:33PM -0400, Jason Merrill wrote: Yes; if the standard says something nonsensical, I prefer to figure out something more sensible to propose as a change. Ok, so here it is implemented, so far tested only on the new

Re: [patch][version 6] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-08-16 Thread Qing Zhao via Gcc-patches
> On Aug 16, 2021, at 2:40 AM, Richard Biener wrote: > > On Thu, 12 Aug 2021, Qing Zhao wrote: > >> Hi, Richard, >> >> For RTL expansion of call to .DEFERRED_INIT, I changed my code per your >> suggestions like following: >> >> == >> #define INIT_PATTERN_VALUE 0xFE >>

Re: What should a std::error_code pretty printer show?

2021-08-16 Thread Jonathan Wakely via Gcc-patches
On Mon, 16 Aug 2021 at 17:51, Jonathan Wakely wrote: > > On Mon, 16 Aug 2021 at 13:11, Jonathan Wakely wrote: > > > > > > > > On Mon, 16 Aug 2021, 12:55 Jonathan Wakely, wrote: > >> > >> I'm adding a GDB printer for std::error_code.What I have now prints > >> the category name as a quoted

Re: [PATCH] c++: aggregate CTAD and brace elision [PR101344]

2021-08-16 Thread Patrick Palka via Gcc-patches
On Mon, 16 Aug 2021, Marek Polacek wrote: > On Mon, Aug 16, 2021 at 03:06:08PM -0400, Patrick Palka via Gcc-patches wrote: > > During aggregate CTAD, collect_ctor_idx_types always recurses into a > > sub-CONSTRUCTOR, regardless of whether the corresponding pair of braces > > was elided in the

Re: [PATCH] c++: aggregate CTAD and brace elision [PR101344]

2021-08-16 Thread Marek Polacek via Gcc-patches
On Mon, Aug 16, 2021 at 03:06:08PM -0400, Patrick Palka via Gcc-patches wrote: > During aggregate CTAD, collect_ctor_idx_types always recurses into a > sub-CONSTRUCTOR, regardless of whether the corresponding pair of braces > was elided in the original initializer. This causes us to reject some >

Re: [PATCH] [MIPS] Hazard barrier return support

2021-08-16 Thread Andrew Pinski via Gcc-patches
On Mon, Aug 16, 2021 at 7:43 AM Dragan Mladjenovic via Gcc-patches wrote: > > This patch allows a function to request clearing of all instruction and > execution > hazards upon normal return via __attribute__ ((use_hazard_barrier_return)). > > 2017-04-25 Prachi Godbole > > gcc/ > *

[PATCH] c++: ignore explicit dguides during NTTP CTAD [PR101883]

2021-08-16 Thread Patrick Palka via Gcc-patches
Since (template) argument passing is a copy-initialization context, we mustn't consider explicit deduction guides when deducing a CTAD placeholder type of an NTTP. Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk/11? PR c++/101883 gcc/cp/ChangeLog:

[PATCH] c++: aggregate CTAD and brace elision [PR101344]

2021-08-16 Thread Patrick Palka via Gcc-patches
During aggregate CTAD, collect_ctor_idx_types always recurses into a sub-CONSTRUCTOR, regardless of whether the corresponding pair of braces was elided in the original initializer. This causes us to reject some completely-braced forms of aggregate CTAD as in the first testcase below, because

Re: [PATCH][Hashtable 6/6] PR 68303 small size optimization

2021-08-16 Thread François Dumont via Gcc-patches
On 17/07/20 2:58 pm, Jonathan Wakely wrote: On 17/11/19 22:31 +0100, François Dumont wrote: This is an implementation of PR 68303. I try to use this idea as much as possible to avoid computation of hash codes. Note that tests are not showing any gain. I guess hash computation must be

Re: [PATCH] RISC-V: Enable overlap-by-pieces in case of fast unaliged access

2021-08-16 Thread Andrew Pinski via Gcc-patches
On Mon, Aug 16, 2021 at 10:10 AM Palmer Dabbelt wrote: > > On Mon, 16 Aug 2021 09:29:16 PDT (-0700), Kito Cheng wrote: > >> > Could you submit v3 patch which is v1 with overlap_op_by_pieces field, > >> > testcase from v2 and add a few more comments to describe the field? > >> > > >> > And add an

Re: [Patch][GCC][middle-end] - Generate FRINTZ for (double)(int) under -ffast-math on aarch64

2021-08-16 Thread Andrew Pinski via Gcc-patches
On Mon, Aug 16, 2021 at 9:15 AM Jirui Wu via Gcc-patches wrote: > > Hi all, > > This patch generates FRINTZ instruction to optimize type casts. > > The changes in this patch covers: > * Opimization of a FIX_TRUNC_EXPR cast inside a FLOAT_EXPR using IFN_TRUNC. > * Change of corresponding test

[r12-2919 Regression] FAIL: gcc.target/i386/pr82460-2.c scan-assembler-not \\mvpermi2b\\M on Linux/x86_64

2021-08-16 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, faf2b6bc527dff31725dde55381c92688047 is the first bad commit commit faf2b6bc527dff31725dde55381c92688047 Author: liuhongt Date: Mon Aug 16 11:16:52 2021 +0800 Optimize __builtin_shuffle_vector. caused FAIL: gcc.target/i386/pr82460-2.c scan-assembler-not

Re: [PATCH, V2 2/3] targhooks: New target hook for CTF/BTF debug info emission

2021-08-16 Thread Indu Bhagat via Gcc-patches
On 8/10/21 4:54 AM, Richard Biener wrote: On Thu, Aug 5, 2021 at 2:52 AM Indu Bhagat via Gcc-patches wrote: This patch adds a new target hook to detect if the CTF container can allow the emission of CTF/BTF debug info at DWARF debug info early finish time. Some backends, e.g., BPF when

C++ Patch ping

2021-08-16 Thread Jakub Jelinek via Gcc-patches
Hi! I'd like to ping 3 patches: c++: Add C++20 #__VA_OPT__ support https://gcc.gnu.org/pipermail/gcc-patches/2021-July/575355.html libcpp: __VA_OPT__ p1042r1 placemarker changes [PR101488] https://gcc.gnu.org/pipermail/gcc-patches/2021-July/575621.html libcpp, v2: Implement C++23 P1949R7 - C++

Re: [PATCH] c++, v2: Implement P0466R5 __cpp_lib_is_layout_compatible compiler helpers [PR101539]

2021-08-16 Thread Jakub Jelinek via Gcc-patches
On Thu, Aug 12, 2021 at 07:07:00PM +0200, Jakub Jelinek via Gcc-patches wrote: > On Thu, Aug 12, 2021 at 12:06:33PM -0400, Jason Merrill wrote: > > Yes; if the standard says something nonsensical, I prefer to figure out > > something more sensible to propose as a change. > > Ok, so here it is

Re: [PATCH] RISC-V: Enable overlap-by-pieces in case of fast unaliged access

2021-08-16 Thread Palmer Dabbelt
On Mon, 16 Aug 2021 09:29:16 PDT (-0700), Kito Cheng wrote: > Could you submit v3 patch which is v1 with overlap_op_by_pieces field, > testcase from v2 and add a few more comments to describe the field? > > And add an -mtune=ultra-size to make it able to test without change > other behavior? > >

Re: [PATCH 1/2] analyzer: detect and analyze calls via function pointer (GSoC)

2021-08-16 Thread Ankur Saini via Gcc-patches
Thanks for the review > On 16-Aug-2021, at 4:48 AM, David Malcolm wrote: > > Thanks, this is looking promising. Has this been rebased recently > (e.g. since I merged > https://gcc.gnu.org/pipermail/gcc-patches/2021-August/576737.html ) Yes, The branch is totally up to date with master at

[committed] libstdc++: Use qualified-id for class member constant [PR101937]

2021-08-16 Thread Jonathan Wakely via Gcc-patches
The expression ctx._M_indent is not a constant expression when ctx is a reference parameter, even though _M_indent is an enumerator. Rename it to _S_indent to be consistent with our conventions, and refer to it as PrintContext::_S_indent to be valid C++ code (at least until P2280 is accepted as a

[committed] libstdc++: Install GDB pretty printers for debug library

2021-08-16 Thread Jonathan Wakely via Gcc-patches
The additional libraries installed by --enable-libstdcxx-debug are built without optimization to aid debugging, but the Python pretty printers are not installed alongside them. This means that you can step through the unoptimized library code, but at the expense of pretty printing the library

Re: What should a std::error_code pretty printer show?

2021-08-16 Thread Jonathan Wakely via Gcc-patches
On Mon, 16 Aug 2021 at 13:11, Jonathan Wakely wrote: > > > > On Mon, 16 Aug 2021, 12:55 Jonathan Wakely, wrote: >> >> I'm adding a GDB printer for std::error_code.What I have now prints >> the category name as a quoted string, followed by the error value: >> >> {"system": 0} >> {"system": 1234}

Re: [patch][version 6] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-08-16 Thread Qing Zhao via Gcc-patches
> On Aug 16, 2021, at 2:11 AM, Richard Biener wrote: > > On Wed, 11 Aug 2021, Qing Zhao wrote: > >> Hi, >> >> I met another issue for “address taken” auto variable, see below for details: >> >> the testing case: (gcc/testsuite/gcc.dg/uninit-16.c) >> >> int foo, bar; >> >> static >>

[PATCH 3/3] aarch64: Remove macros for vld4[q]_lane Neon intrinsics

2021-08-16 Thread Jonathan Wright via Gcc-patches
Hi, This patch removes macros for vld4[q]_lane Neon intrinsics. This is a preparatory step before adding new modes for structures of Advanced SIMD vectors. Regression tested and bootstrapped on aarch64-none-linux-gnu - no issues. Ok for master? Thanks, Jonathan --- gcc/ChangeLog: 2021-08-16

[PATCH 2/3] aarch64: Remove macros for vld3[q]_lane Neon intrinsics

2021-08-16 Thread Jonathan Wright via Gcc-patches
Hi, This patch removes macros for vld3[q]_lane Neon intrinsics. This is a preparatory step before adding new modes for structures of Advanced SIMD vectors. Regression tested and bootstrapped on aarch64-none-linux-gnu - no issues. Ok for master? Thanks, Jonathan --- gcc/ChangeLog: 2021-08-16

[PATCH 1/3] aarch64: Remove macros for vld2[q]_lane Neon intrinsics

2021-08-16 Thread Jonathan Wright via Gcc-patches
Hi, This patch removes macros for vld2[q]_lane Neon intrinsics. This is a preparatory step before adding new modes for structures of Advanced SIMD vectors. Regression tested and bootstrapped on aarch64-none-linux-gnu - no issues. Ok for master? Thanks, Jonathan --- gcc/ChangeLog: 2021-08-12

Re: [PATCH] RISC-V: Enable overlap-by-pieces in case of fast unaliged access

2021-08-16 Thread Kito Cheng via Gcc-patches
> > Could you submit v3 patch which is v1 with overlap_op_by_pieces field, > > testcase from v2 and add a few more comments to describe the field? > > > > And add an -mtune=ultra-size to make it able to test without change > > other behavior? > > > > Hi Palmer: > > > > Are you OK with that? > >

Re: [PATCH] RISC-V: Enable overlap-by-pieces in case of fast unaliged access

2021-08-16 Thread Palmer Dabbelt
On Mon, 16 Aug 2021 03:02:42 PDT (-0700), Kito Cheng wrote: HI Christoph: Could you submit v3 patch which is v1 with overlap_op_by_pieces field, testcase from v2 and add a few more comments to describe the field? And add an -mtune=ultra-size to make it able to test without change other

[Patch][GCC][middle-end] - Generate FRINTZ for (double)(int) under -ffast-math on aarch64

2021-08-16 Thread Jirui Wu via Gcc-patches
Hi all, This patch generates FRINTZ instruction to optimize type casts. The changes in this patch covers: * Opimization of a FIX_TRUNC_EXPR cast inside a FLOAT_EXPR using IFN_TRUNC. * Change of corresponding test cases. Regtested on aarch64-none-linux-gnu and no issues. Ok for master? If OK

Re: [patch][version 6] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-08-16 Thread Qing Zhao via Gcc-patches
> On Aug 16, 2021, at 2:40 AM, Richard Biener wrote: > > On Thu, 12 Aug 2021, Qing Zhao wrote: > >> Hi, Richard, >> >> For RTL expansion of call to .DEFERRED_INIT, I changed my code per your >> suggestions like following: >> >> == >> #define INIT_PATTERN_VALUE 0xFE >>

Re: [patch][version 6] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-08-16 Thread Qing Zhao via Gcc-patches
> On Aug 16, 2021, at 10:08 AM, Richard Biener wrote: > > On August 16, 2021 4:48:16 PM GMT+02:00, Qing Zhao > wrote: >> >> >>> On Aug 16, 2021, at 2:12 AM, Richard Biener wrote: >>> >>> On Wed, 11 Aug 2021, Qing Zhao wrote: >>> Hi, I finally decided to take another

Re: [patch][version 6] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-08-16 Thread Richard Biener via Gcc-patches
On August 16, 2021 4:48:16 PM GMT+02:00, Qing Zhao wrote: > > >> On Aug 16, 2021, at 2:12 AM, Richard Biener wrote: >> >> On Wed, 11 Aug 2021, Qing Zhao wrote: >> >>> Hi, >>> >>> I finally decided to take another approach to resolve this issue, it >>> resolved all the potential issues with

Re: [patch][version 6] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-08-16 Thread Qing Zhao via Gcc-patches
> On Aug 16, 2021, at 2:12 AM, Richard Biener wrote: > > On Wed, 11 Aug 2021, Qing Zhao wrote: > >> Hi, >> >> I finally decided to take another approach to resolve this issue, it >> resolved all the potential issues with the “address taken” auto variable. >> >> The basic idea is to avoid

[PATCH] [MIPS] Hazard barrier return support

2021-08-16 Thread Dragan Mladjenovic via Gcc-patches
This patch allows a function to request clearing of all instruction and execution hazards upon normal return via __attribute__ ((use_hazard_barrier_return)). 2017-04-25 Prachi Godbole gcc/ * config/mips/mips.h (machine_function): New variable use_hazard_barrier_return_p.

Re: [PATCH] Try LTO partial linking. (Was: Speed of compiling gimple-match.c)

2021-08-16 Thread Martin Liška
PING^2 @Honza: Can you please review the change? Martin On 6/23/21 3:53 PM, Martin Liška wrote: On 5/21/21 10:29 AM, Martin Liška wrote: On 5/20/21 5:55 PM, Jan Hubicka wrote: Quick solution is to also modify partitioner to use the local symbol names when doing incremental linking (those

Re: [PATCH v4] gcov: Add TARGET_GCOV_TYPE_SIZE target hook

2021-08-16 Thread Sebastian Huber
On 16/08/2021 14:33, Martin Liška wrote: On 8/12/21 6:13 PM, Joseph Myers wrote: This is not a review of the patch, but I think this version addresses all the issues I had with previous versions regarding target macro/hook handling. And I'm fine with the GCOV part. Please install the patch.

Re: [PATCH] vect: Add extraction cost for slp reduc

2021-08-16 Thread Richard Biener via Gcc-patches
On Mon, Aug 16, 2021 at 9:16 AM Kewen.Lin wrote: > > Hi Richi, > > Thanks for the comments! > > on 2021/8/16 下午2:49, Richard Biener wrote: > > On Mon, Aug 16, 2021 at 8:03 AM Kewen.Lin wrote: > >> > >> Hi, > >> > >> IIUC, the function vectorizable_bb_reduc_epilogue missed to > >> consider the

Re: Ping: [PATCH v2] Analyze niter for until-wrap condition [PR101145]

2021-08-16 Thread Jiufu Guo via Gcc-patches
Jiufu Guo writes: "Bin.Cheng" writes: On Wed, Aug 4, 2021 at 10:42 AM guojiufu wrote: Hi, cut... >> @@ -0,0 +1,63 @@ >> +TYPE __attribute__ ((noinline)) >> +foo_sign (int *__restrict__ a, int *__restrict__ b, TYPE >> l, >> TYPE n) >> +{ >> + for (l = L_BASE; n < l; l += C) >> +

[PATCH] arm: Fix __arm_vctp16q return type in arm_mve.h

2021-08-16 Thread Christophe Lyon via Gcc-patches
__arm_vctp16q actually returns mve_pred16_t rather than int64_t. 2021-08-16 Christophe Lyon gcc/ * config/arm/arm_mve.h: Fix __arm_vctp16q return type. --- gcc/config/arm/arm_mve.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/arm/arm_mve.h

Re: 'hash_map>'

2021-08-16 Thread Thomas Schwinge
Hi! On 2021-08-12T17:15:44-0600, Martin Sebor via Gcc wrote: > On 8/6/21 10:57 AM, Thomas Schwinge wrote: >> So I'm trying to do some C++... ;-) >> >> Given: >> >> /* A map from SSA names or var decls to record fields. */ >> typedef hash_map field_map_t; >> >> /* For each

Re: Ping: [PATCH v2] Analyze niter for until-wrap condition [PR101145]

2021-08-16 Thread Jiufu Guo via Gcc-patches
"Bin.Cheng" writes: On Wed, Aug 4, 2021 at 10:42 AM guojiufu wrote: Hi, cut... >> @@ -0,0 +1,63 @@ >> +TYPE __attribute__ ((noinline)) >> +foo_sign (int *__restrict__ a, int *__restrict__ b, TYPE l, >> TYPE n) >> +{ >> + for (l = L_BASE; n < l; l += C) >> +*a++ = *b++ + 1; >> +

Re: [PATCH 1/5] x86: Add -mmwait for -mgeneral-regs-only

2021-08-16 Thread Martin Liška
On 8/16/21 2:28 PM, Richard Biener via Gcc-patches wrote: Yes please, and do it with the same commit doing the .opt change. Just one quick note: I've got a periodic builder that verifies the LTO stream on tramp3d in all active branches. Martin

Re: [PATCH 1/5] x86: Add -mmwait for -mgeneral-regs-only

2021-08-16 Thread H.J. Lu via Gcc-patches
On Mon, Aug 16, 2021 at 5:28 AM Richard Biener wrote: > > On Mon, Aug 16, 2021 at 2:25 PM H.J. Lu wrote: > > > > On Sun, Aug 15, 2021 at 11:11 PM Richard Biener > > wrote: > > > > > > On Fri, Aug 13, 2021 at 3:51 PM H.J. Lu wrote: > > > > > > > > Add -mmwait so that the MWAIT and MONITOR

Re: [PATCH v4] gcov: Add TARGET_GCOV_TYPE_SIZE target hook

2021-08-16 Thread Martin Liška
On 8/12/21 6:13 PM, Joseph Myers wrote: This is not a review of the patch, but I think this version addresses all the issues I had with previous versions regarding target macro/hook handling. And I'm fine with the GCOV part. Please install the patch. Martin

Re: [PATCH 1/5] x86: Add -mmwait for -mgeneral-regs-only

2021-08-16 Thread Richard Biener via Gcc-patches
On Mon, Aug 16, 2021 at 2:25 PM H.J. Lu wrote: > > On Sun, Aug 15, 2021 at 11:11 PM Richard Biener > wrote: > > > > On Fri, Aug 13, 2021 at 3:51 PM H.J. Lu wrote: > > > > > > Add -mmwait so that the MWAIT and MONITOR intrinsics can be used with > > > -mgeneral-regs-only and make -msse3 to imply

Re: [PATCH 1/5] x86: Add -mmwait for -mgeneral-regs-only

2021-08-16 Thread H.J. Lu via Gcc-patches
On Sun, Aug 15, 2021 at 11:11 PM Richard Biener wrote: > > On Fri, Aug 13, 2021 at 3:51 PM H.J. Lu wrote: > > > > Add -mmwait so that the MWAIT and MONITOR intrinsics can be used with > > -mgeneral-regs-only and make -msse3 to imply -mmwait. > > Adding new options requires to bump the LTO

Re: [patch] Fix regression in debug info for Ada with DWARF 5

2021-08-16 Thread Richard Biener via Gcc-patches
On Mon, Aug 16, 2021 at 12:25 PM Eric Botcazou wrote: > > Hi, > > add_scalar_info can directly generate a reference to an existing DIE for a > scalar attribute, e.g the upper bound of a VLA, but it does so only if this > existing DIE has a location or is a constant: > > if (get_AT

Re: [PATCH] Do not enable DT_INIT_ARRAY/DT_FINI_ARRAY on uclinuxfdpiceabi

2021-08-16 Thread Christophe LYON via Gcc-patches
ping? On 12/08/2021 17:29, Christophe Lyon via Gcc-patches wrote: Commit r12-1328 enabled DT_INIT_ARRAY/DT_FINI_ARRAY for all Linux targets, but this does not work for arm-none-uclinuxfdpiceabi: it makes all the execution tests fail. This patch restores the original behavior for

Re: [PATCH] arm: Fix multilib mapping for CDE extensions [PR100856]

2021-08-16 Thread Christophe LYON via Gcc-patches
ping? On 11/08/2021 16:06, Christophe Lyon wrote: ping? https://gcc.gnu.org/pipermail/gcc-patches/2021-July/575310.html On Wed, Aug 4, 2021 at 11:13 AM Christophe Lyon via Gcc-patches mailto:gcc-patches@gcc.gnu.org>> wrote:

Re: [PATCH] Fix incorrect computation in fill_always_executed_in_1

2021-08-16 Thread Richard Biener via Gcc-patches
On Mon, 16 Aug 2021, Xiong Hu Luo wrote: > It seems to me that ALWAYS_EXECUTED_IN is not computed correctly for > nested loops. inn_loop is updated to inner loop, so it need be restored > when exiting from innermost loop. With this patch, the store instruction > in outer loop could also be moved

Re: [PATCH] Speed up jump table switch detection.

2021-08-16 Thread Richard Biener via Gcc-patches
On Mon, Aug 16, 2021 at 10:28 AM Martin Liška wrote: > > Hi. > > As mentioned in the PR, this patch speeds up rapidly jump table detection > in switch lowering. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed? OK. > Thanks, > Martin > >

GCC 11 backports

2021-08-16 Thread Martin Liška
I'm going to apply the following 3 tested patches. Martin >From 85b78f6c38bb357abb749fed81a1e7a589050461 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Thu, 12 Aug 2021 16:01:01 +0200 Subject: [PATCH 1/3] ipa: make target_clone default decl local [PR101726] PR ipa/101726 gcc/ChangeLog:

[PATCH][gcc-11][pushed] LTO: bump minor version

2021-08-16 Thread Martin Liška
Bump the LTO_minor_version due to changes in 52f0aa4dee8401ef3958dbf789780b0ee877beab PR c/100150 gcc/ChangeLog: * lto-streamer.h (LTO_minor_version): Bump. --- gcc/lto-streamer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/lto-streamer.h

Address '?:' issues in 'libgomp.oacc-c-c++-common/mode-transitions.c'

2021-08-16 Thread Thomas Schwinge
Hi! Pushed "Address '?:' issues in 'libgomp.oacc-c-c++-common/mode-transitions.c'" to master branch in commit a2ab2f0dfba0fa69ebf6c82e34750911b2e5a639, see attached. Grüße Thomas - Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München;

Re: [PATCH 1/4] openacc: Middle-end worker-partitioning support

2021-08-16 Thread Thomas Schwinge
Hi! On 2021-03-02T04:20:11-0800, Julian Brown wrote: > --- /dev/null > +++ b/gcc/oacc-neuter-bcast.c Allocated here: > +static parallel_g * > +omp_sese_find_par (bb_stmt_map_t *map, parallel_g *par, basic_block block) > +{ > + par = new parallel_g ([...]); > + par = new

Re: [PATCH 1/4] openacc: Middle-end worker-partitioning support

2021-08-16 Thread Thomas Schwinge
Hi! On 2021-03-02T04:20:11-0800, Julian Brown wrote: > --- /dev/null > +++ b/gcc/oacc-neuter-bcast.c Allocated here: > +/* Sets of SSA_NAMES or VAR_DECLs to propagate. */ > +typedef hash_set propagation_set; > + > +static void > +find_ssa_names_to_propagate ([...], > +

Re: [PATCH 1/4] openacc: Middle-end worker-partitioning support

2021-08-16 Thread Thomas Schwinge
Hi! On 2021-08-06T09:49:58+0100, Julian Brown wrote: > On Wed, 4 Aug 2021 15:13:30 +0200 > Thomas Schwinge wrote: > >> 'oacc_do_neutering' is the 'execute' function of the pass, so that >> means every time this executes, a fresh 'field_map' is set up, no >> state persists across runs (assuming

[patch] Fix regression in debug info for Ada with DWARF 5

2021-08-16 Thread Eric Botcazou
Hi, add_scalar_info can directly generate a reference to an existing DIE for a scalar attribute, e.g the upper bound of a VLA, but it does so only if this existing DIE has a location or is a constant: if (get_AT (decl_die, DW_AT_location) || get_AT (decl_die,

Disable GNAT encodings by default

2021-08-16 Thread Eric Botcazou
Given the latest work in the compiler and debugger, we no longer need to use most GNAT-specific encodings in the debug info generated for an Ada program, so the attached patch disables them, except with -fgnat-encodings=all. Tested on x86-64/Linux, applied on the mainline as obvious. 2021-08-16

Re: [PATCH] RISC-V: Enable overlap-by-pieces in case of fast unaliged access

2021-08-16 Thread Kito Cheng via Gcc-patches
HI Christoph: Could you submit v3 patch which is v1 with overlap_op_by_pieces field, testcase from v2 and add a few more comments to describe the field? And add an -mtune=ultra-size to make it able to test without change other behavior? Hi Palmer: Are you OK with that? On Sat, Aug 14, 2021

Re: [Patch] [OpenMP] Update omp-low.c's omp_runtime_api_call [PR101931]

2021-08-16 Thread Jakub Jelinek via Gcc-patches
On Mon, Aug 16, 2021 at 11:55:50AM +0200, Tobias Burnus wrote: > [OpenMP] Update omp-low.c's omp_runtime_api_call [PR101931] > > gcc/ChangeLog: > > PR middle-end/101931 > * omp-low.c (omp_runtime_api_call): Update for routines > added in the meanwhile. LGTM, thanks.

[Patch] [OpenMP] Update omp-low.c's omp_runtime_api_call [PR101931]

2021-08-16 Thread Tobias Burnus
Compared to the PR, it also contains omp_alloc/omp_free which I missed when creating the PR. Hopefully, I haven't missed any other routine. OK? (Once bootstrap+testing succeeded, but I do not expect issues.) Tobias - Siemens Electronic Design Automation GmbH; Anschrift:

[Patch] [OpenMP] Update omp-low.c's omp_runtime_api_call [PR101931]

2021-08-16 Thread Tobias Burnus
Compared to the PR, it also contains omp_alloc/omp_free which I missed when creating the PR. Hopefully, I haven't missed any other routine. OK? (Once bootstrap+testing succeeded, but I do not expect issues.) Tobias - Siemens Electronic Design Automation GmbH; Anschrift:

Re: [PATCH] RISC-V: Allow unaligned accesses in cpymemsi expansion

2021-08-16 Thread Kito Cheng via Gcc-patches
Hi Christoph: Generally LGTM, only 1 minor comment. > @@ -3292,8 +3294,17 @@ riscv_expand_block_move (rtx dest, rtx src, rtx length) >unsigned HOST_WIDE_INT hwi_length = UINTVAL (length); >unsigned HOST_WIDE_INT factor, align; > > - align = MIN (MIN (MEM_ALIGN (src),

RE: [wwwdocs] gcc-12/changes.html (GCN): >1 workers per gang

2021-08-16 Thread Thomas Schwinge
Hi! On 2021-08-16T10:34:34+0200, "Stubbs, Andrew" wrote: >> In other words: For gangs > #CUs or >1 gang per CU, the following patch >> is needed: >>[OG11] https://gcc.gnu.org/g:4dcd1e1f4e6b451aac44f919b8eb3ac49292b308 >>[email]

Re: [PATCH] i386: Add peephole for lea and zero extend [PR 101716]

2021-08-16 Thread Uros Bizjak via Gcc-patches
On Mon, Aug 16, 2021 at 11:18 AM Hongyu Wang wrote: > > > So, the question is if the combine pass really needs to zero-extend > > with 0xfffe, the left shift << 1 guarantees zero in the LSB, so > > 0x should be better and in line with canonical zero-extension > > RTX. > > The shift

Re: [PATCH] [i386] Fix ICE.

2021-08-16 Thread Uros Bizjak via Gcc-patches
On Mon, Aug 16, 2021 at 11:19 AM liuhongt wrote: > > Hi: > avx512f_scalef2 only accept register_operand for operands[1], > force it to reg in ldexp3. > > Bootstrapped and regtested on x86_64-linux-gnu{-m32,}. > Ok for trunk. > > gcc/ChangeLog: > > PR target/101930 > *

[PATCH] [i386] Fix ICE.

2021-08-16 Thread liuhongt via Gcc-patches
Hi: avx512f_scalef2 only accept register_operand for operands[1], force it to reg in ldexp3. Bootstrapped and regtested on x86_64-linux-gnu{-m32,}. Ok for trunk. gcc/ChangeLog: PR target/101930 * config/i386/i386.md (ldexp3): Force operands[1] to reg.

Re: [PATCH] i386: Add peephole for lea and zero extend [PR 101716]

2021-08-16 Thread Hongyu Wang via Gcc-patches
> So, the question is if the combine pass really needs to zero-extend > with 0xfffe, the left shift << 1 guarantees zero in the LSB, so > 0x should be better and in line with canonical zero-extension > RTX. The shift mask is generated in simplify_shift_const_1: mask_rtx =

[PATCH] Fix incorrect computation in fill_always_executed_in_1

2021-08-16 Thread Xiong Hu Luo via Gcc-patches
It seems to me that ALWAYS_EXECUTED_IN is not computed correctly for nested loops. inn_loop is updated to inner loop, so it need be restored when exiting from innermost loop. With this patch, the store instruction in outer loop could also be moved out of outer loop by store motion. Any comments?

RE: [wwwdocs] gcc-12/changes.html (GCN): >1 workers per gang

2021-08-16 Thread Stubbs, Andrew
> In other words: For gangs > #CUs or >1 gang per CU, the following patch > is needed: >[OG11] https://gcc.gnu.org/g:4dcd1e1f4e6b451aac44f919b8eb3ac49292b308 >[email] https://gcc.gnu.org/pipermail/gcc-patches/2020-July/550102.html > "not suitable for mainline until the

[PATCH] Speed up jump table switch detection.

2021-08-16 Thread Martin Liška
Hi. As mentioned in the PR, this patch speeds up rapidly jump table detection in switch lowering. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin PR tree-optimization/100393 gcc/ChangeLog: *

Re: [ping] Re-unify 'omp_build_component_ref' and 'oacc_build_component_ref'

2021-08-16 Thread Jakub Jelinek via Gcc-patches
On Mon, Aug 16, 2021 at 10:08:42AM +0200, Thomas Schwinge wrote: > --- a/gcc/omp-general.c > +++ b/gcc/omp-general.c > @@ -2815,4 +2815,25 @@ oacc_get_ifn_dim_arg (const gimple *stmt) >return (int) axis; > } > > +/* Build COMPONENT_REF and set TREE_THIS_VOLATILE and TREE_READONLY on it > +

Re: [PATCH] i386: Add peephole for lea and zero extend [PR 101716]

2021-08-16 Thread Uros Bizjak via Gcc-patches
On Fri, Aug 13, 2021 at 9:21 AM Uros Bizjak wrote: > > On Fri, Aug 13, 2021 at 2:48 AM Hongyu Wang wrote: > > > > Hi, > > > > For lea + zero_extendsidi insns, if dest of lea and src of zext are the > > same, combine them with single leal under 64bit target since 32bit > > register will be

[ping] Re-unify 'omp_build_component_ref' and 'oacc_build_component_ref'

2021-08-16 Thread Thomas Schwinge
Hi! Ping. On 2021-08-09T16:16:51+0200, I wrote: > [from internal] > > > Hi! > > This concerns a class of ICEs seen as of og10 branch with the > "openacc: Middle-end worker-partitioning support" and "amdgcn: > Enable OpenACC worker partitioning for AMD GCN" changes applied: > > On

Re: [patch][version 6] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-08-16 Thread Richard Biener via Gcc-patches
On Thu, 12 Aug 2021, Qing Zhao wrote: > Hi, Richard, > > For RTL expansion of call to .DEFERRED_INIT, I changed my code per your > suggestions like following: > > == > #define INIT_PATTERN_VALUE 0xFE > static void > expand_DEFERRED_INIT (internal_fn, gcall *stmt) > { >

Re: [PATCH] [i386] Optimize vec_perm_expr to match vpmov{dw,qd,wb}.

2021-08-16 Thread Richard Biener via Gcc-patches
On Fri, Aug 13, 2021 at 11:04 AM Richard Sandiford via Gcc-patches wrote: > > Jakub Jelinek via Gcc-patches writes: > > On Fri, Aug 13, 2021 at 09:42:00AM +0800, Hongtao Liu wrote: > >> > So, I wonder if your new routine shouldn't be instead done after > >> > in ix86_expand_vec_perm_const_1

Re: [PATCH] [i386] Optimize __builtin_shuffle_vector.

2021-08-16 Thread Hongtao Liu via Gcc-patches
On Mon, Aug 16, 2021 at 3:11 PM Jakub Jelinek via Gcc-patches wrote: > > On Mon, Aug 16, 2021 at 01:18:38PM +0800, liuhongt via Gcc-patches wrote: > > + /* Accept VNxHImode and VNxQImode now. */ > > + if (!TARGET_AVX512VL && GET_MODE_SIZE (mode) < 64) > > +return false; > > + > > + /*

Re: [Patch] Fortran/OpenMP: Add support for OpenMP 5.1 masked construct (was: Re: [committed] openmp: Add support for OpenMP 5.1 masked construct)

2021-08-16 Thread Jakub Jelinek via Gcc-patches
On Fri, Aug 13, 2021 at 08:52:34PM +0200, Tobias Burnus wrote: > gcc/fortran/ChangeLog: > > * dump-parse-tree.c (show_omp_clauses): Handle 'filter' clause. > (show_omp_node, show_code_node): Handle (combined) omp masked construct. > * frontend-passes.c (gfc_code_walker):

Re: [PATCH] vect: Add extraction cost for slp reduc

2021-08-16 Thread Kewen.Lin via Gcc-patches
Hi Richi, Thanks for the comments! on 2021/8/16 下午2:49, Richard Biener wrote: > On Mon, Aug 16, 2021 at 8:03 AM Kewen.Lin wrote: >> >> Hi, >> >> IIUC, the function vectorizable_bb_reduc_epilogue missed to >> consider the cost to extract the final value from the vector >> for reduc operations.

Re: [PATCH] Adding target hook allows to reject initialization of register

2021-08-16 Thread Richard Biener via Gcc-patches
On Fri, Aug 13, 2021 at 3:59 AM Jojo R wrote: > > > — Jojo > 在 2021年8月11日 +0800 PM6:44,Richard Biener ,写道: > > On Wed, Aug 11, 2021 at 11:28 AM Richard Sandiford > wrote: > > > Richard Biener writes: > > On Tue, Aug 10, 2021 at 10:33 AM Jojo R via Gcc-patches > wrote: > > > Some target like

Re: [patch][version 6] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-08-16 Thread Richard Biener via Gcc-patches
On Wed, 11 Aug 2021, Qing Zhao wrote: > Hi, > > I finally decided to take another approach to resolve this issue, it resolved > all the potential issues with the “address taken” auto variable. > > The basic idea is to avoid generating the temporary variable in the > beginning. > As you

Re: [patch][version 6] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-08-16 Thread Richard Biener via Gcc-patches
On Wed, 11 Aug 2021, Qing Zhao wrote: > Hi, > > I met another issue for “address taken” auto variable, see below for details: > > the testing case: (gcc/testsuite/gcc.dg/uninit-16.c) > > int foo, bar; > > static > void decode_reloc(int reloc, int *is_alt) > { > if (reloc >= 20) >

  1   2   >