[PATCH] Fix OpenMP target parallel reduction (task, ...) (PR c/91149)

2019-07-12 Thread Jakub Jelinek
Hi! I've discovered a pasto, which breaks the following testcase. Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk, will backport to 9.2 too. 2019-07-13 Jakub Jelinek PR c/91149 * c-omp.c (c_omp_split_clauses): Fix a pasto in OMP

[committed] Add some further restrictions for order(concurrent)

2019-07-12 Thread Jakub Jelinek
Hi! The constructs with order(concurrent) clause have some extra restrictions, this patch diagnoses those that are easy to diagnose. Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk. 2019-07-13 Jakub Jelinek * gimplify.c (struct gimplify_omp_ctx): Add order_c

Re: [RFA] adjust src-release following the renaming of gdb/common/ to gdb/gdbsupport/

2019-07-12 Thread Richard Biener
a result, >it falls back on using the version.in file verbatim, meaning that >the "DATE" placeholder doesn't get replaced with the snapshot date, >and the "-git" suffix doesn't get stripped. More precisely, we get >snapshots called "gdb-8.3.50-DATE-g

Re: [PATCH v3] libiberty: Check zero value shstrndx in simple-object-elf.c

2019-07-12 Thread Ian Lance Taylor
On Fri, Jul 12, 2019 at 4:59 PM Ren Kimura wrote: > > This patch fixes a Bug 90924. > simple_object_elf functions don't load section table 0 of ELF file, which is > not a useful. > However If e_shstrndx in ELF header points to a section table 0 (i.e. > e_shstrndx == 0), a calculation of offset t

[PATCH v3] libiberty: Check zero value shstrndx in simple-object-elf.c

2019-07-12 Thread Ren Kimura
This patch fixes a Bug 90924. simple_object_elf functions don't load section table 0 of ELF file, which is not a useful. However If e_shstrndx in ELF header points to a section table 0 (i.e. e_shstrndx == 0), a calculation of offset to string section table causes integer overflow at every line "

Re: [PATCH v2] libiberty: Check zero value shstrndx in simple-object-elf.c

2019-07-12 Thread Ren Kimura
Oh. I missed a ChangeLog entry. Hold on... I'll send v3 patch. Thanks 2019年7月12日(金) 19:37 Ren Kimura : > > This patch fixes a Bug 90924. > simple_object_elf functions don't load section table 0 of ELF file, which is > not a useful. > However If e_shstrndx in ELF header points to a section table

[PATCH v2] libiberty: Check zero value shstrndx in simple-object-elf.c

2019-07-12 Thread Ren Kimura
This patch fixes a Bug 90924. simple_object_elf functions don't load section table 0 of ELF file, which is not a useful. However If e_shstrndx in ELF header points to a section table 0 (i.e. e_shstrndx == 0), a calculation of offset to string section table causes integer overflow at every line "

[RFA] adjust src-release following the renaming of gdb/common/ to gdb/gdbsupport/

2019-07-12 Thread Joel Brobecker
"DATE" placeholder doesn't get replaced with the snapshot date, and the "-git" suffix doesn't get stripped. More precisely, we get snapshots called "gdb-8.3.50-DATE-git.tar" instead of (e.g.) "gdb-8.3-20190712.tar". For those who have been getting snaps

Re: [PATCH] libiberty: Check zero value shstrndx in simple-object-elf.c

2019-07-12 Thread Ian Lance Taylor
On Fri, Jul 12, 2019 at 3:04 PM Ren Kimura wrote: > > This patch fixes a Bug 90924. > simple_object_elf functions don't load section table 0 of ELF file, which is > not a useful. > However If e_shstrndx in ELF header points to a section table 0 (i.e. > e_shstrndx == 0), a calculation of offset t

Re: [C++ PATCH] PR c++/90590 Suppress warning for enumeration value not handled in switch warning

2019-07-12 Thread Marek Polacek
On Fri, Jul 12, 2019 at 02:38:59PM -0400, Marek Polacek wrote: > On Fri, Jul 12, 2019 at 02:34:37PM -0400, Matthew Beliveau wrote: > > @@ -1628,6 +1629,16 @@ c_do_switch_warnings (splay_tree cases, location_t > > switch_location, > >if (cond && tree_int_cst_compare (cond, value)) > > c

[PATCH] libiberty: Check zero value shstrndx in simple-object-elf.c

2019-07-12 Thread Ren Kimura
This patch fixes a Bug 90924. simple_object_elf functions don't load section table 0 of ELF file, which is not a useful. However If e_shstrndx in ELF header points to a section table 0 (i.e. e_shstrndx == 0), a calculation of offset to string section table causes integer overflow at every line "

Re: [PATCH v2] Make lto-dump dump callgraph in DOT format

2019-07-12 Thread Jeff Law
On 7/12/19 2:36 PM, Giuliano Belinassi wrote: > Hi, > > It seems that this patch wasn't merged to trunk yet. Is there any > problem to it? Nope. Just assumed you had access and would commit it yourself. I'll go ahead and commit it for you shortly. jeff

Re: [PATCH v2] Make lto-dump dump callgraph in DOT format

2019-07-12 Thread Giuliano Belinassi
Hi, It seems that this patch wasn't merged to trunk yet. Is there any problem to it? On 07/02, Jeff Law wrote: > On 7/2/19 6:36 AM, Giuliano Belinassi wrote: > > This patch makes lto-dump the symtab callgraph in graphviz DOT format. > > > > Previously, the suggested patch had some minor and chec

C++ PATCH for c++/89906 (GCC 8 backport)

2019-07-12 Thread Marek Polacek
In order to fix 89906 in GCC 8, we need to backport 86098. I think the patch is safe to be backported. Tested x86_64-linux, ok for 8? 2018-06-12 Jason Merrill PR c++/86098 - ICE with template placeholder for TTP. * typeck.c (structural_comptypes) [TEMPLATE_TYPE_PARM]: Check

[Darwin, testsuite, committed] Remove unused test.

2019-07-12 Thread Iain Sandoe
During GCC-9, the codegen for unreachable switch case statements changed such that the (undefined) behaviour of reaching such statements is directed to one of the existing switch cases. This means that the testcase which deals with the old behaviour can no longer work (and there is nothing to test

Re: [C++ PATCH] PR c++/90590 Suppress warning for enumeration value not handled in switch warning

2019-07-12 Thread Marek Polacek
On Fri, Jul 12, 2019 at 02:34:37PM -0400, Matthew Beliveau wrote: > @@ -1628,6 +1629,16 @@ c_do_switch_warnings (splay_tree cases, location_t > switch_location, >if (cond && tree_int_cst_compare (cond, value)) > continue; > > + /* If the enumerator is defined in a system heade

Re: [C++ PATCH] PR c++/90590 Suppress warning for enumeration value not handled in switch warning

2019-07-12 Thread Matthew Beliveau
Hi, This should fix the concerns you had! Now the function only gets the location from the type, and then only look for the name if the type's location is in the header. On Tue, Jul 9, 2019 at 5:21 PM Jason Merrill wrote: > > On 7/9/19 11:18 AM, Matthew Beliveau wrote: > > This patch suppresses t

Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)

2019-07-12 Thread Gaius Mulley
Segher Boessenkool writes: > On Thu, Jul 11, 2019 at 06:09:10PM +0100, Gaius Mulley wrote: >> Segher Boessenkool writes: >> >> > On Thu, Jul 11, 2019 at 12:49:44PM +0100, Gaius Mulley wrote: >> >> Matthias Klose writes: >> >> > powerpc64le-linux-gnu fails to build (search for "unfinished" in t

Re: [COMMITTED] Turn of ipa-ra in builtins test (PR91059)

2019-07-12 Thread Wilco Dijkstra
Hi, I've now backported this to all active branches so the issue can no longer occur: Turn off ipa-ra in builtins test (PR91059) The gcc.c-torture/execute/builtins/lib directory contains a reimplementation of many C library string functions, which causes non-trivial register allocation bugs with

Re: [PATCH] add --param ssa-name-def-chain-limit

2019-07-12 Thread Martin Sebor
On 7/12/19 3:35 AM, Richard Biener wrote: On Thu, Jul 11, 2019 at 7:43 PM Martin Sebor wrote: Attached is a patch that adds a new parameter to limit the number of SSA_NAME assignments for GCC to follow in iterative or recursive algorithms. Purely as a proof of concept the patch introduces the

Re: [PATCH], PowerPC, Patch #9, Refine calculation of whether an address offset is d-form, ds-form, or dq-form

2019-07-12 Thread Segher Boessenkool
On Thu, Jul 11, 2019 at 03:44:02PM -0400, Michael Meissner wrote: > --- gcc/config/rs6000/rs6000-protos.h (revision 273371) > +++ gcc/config/rs6000/rs6000-protos.h (working copy) > @@ -154,6 +154,18 @@ extern align_flags rs6000_loop_align (rt > extern void rs6000_split_logical (rtx [], enum rtx_co

Re: [PATCH 0/3] add support for POD struct convention (PR 61339)

2019-07-12 Thread Martin Sebor
On 7/12/19 9:36 AM, Jason Merrill wrote: On Fri, Jul 12, 2019 at 11:14 AM Martin Sebor wrote: On 7/12/19 5:42 AM, Jonathan Wakely wrote: On 12/07/19 10:24 +0200, Jakub Jelinek wrote: On Mon, Jul 08, 2019 at 03:56:51PM -0600, Martin Sebor wrote: A couple of GCC's Coding Conventions call to

Re: [PATCH] improve ifcvt optimization (PR rtl-optimization/89430)

2019-07-12 Thread Jeff Law
On 7/8/19 1:39 AM, JiangNing OS wrote: > Hi Jeff and Richard B., > > Following your tips, I've found a much simpler solution in tree-ssa-phiopt.c. > Attached is the new patch. Review again, please! > > Thanks a lot! > -Jiangning > >> -Original Message- >> From: Jeff Law >> Sent: Saturd

Re: [PATCH 0/3] add support for POD struct convention (PR 61339)

2019-07-12 Thread Martin Sebor
On 7/12/19 9:26 AM, Jonathan Wakely wrote: On 12/07/19 09:14 -0600, Martin Sebor wrote: On 7/12/19 5:42 AM, Jonathan Wakely wrote: On 12/07/19 10:24 +0200, Jakub Jelinek wrote: On Mon, Jul 08, 2019 at 03:56:51PM -0600, Martin Sebor wrote: A couple of GCC's Coding Conventions call to   1) Use

Re: [PATCH] improve ifcvt optimization (PR rtl-optimization/89430)

2019-07-12 Thread Jeff Law
On 7/11/19 10:08 PM, Andrew Pinski wrote: > On Mon, Jul 8, 2019 at 12:39 AM JiangNing OS > wrote: >> >> Hi Jeff and Richard B., >> >> Following your tips, I've found a much simpler solution in >> tree-ssa-phiopt.c. Attached is the new patch. Review again, please! > > /* Prove that we can move

Re: C++17 Support and Website

2019-07-12 Thread Jonathan Wakely
On Wed, 19 Jun 2019 at 20:07, Jonathan Wakely wrote: > > On Wed, 19 Jun 2019 at 20:05, Joel Sherrill wrote: > > > > Hi > > > > I was double checking the C++17 support in GCC for someone and the text at > > this URL states > > the support is experimental and gives the impression that the support i

[wwwdocs] Add caveat about std::rotate bug (PR 90920)

2019-07-12 Thread Jonathan Wakely
Committed to CVS. Index: htdocs/gcc-9/changes.html === RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-9/changes.html,v retrieving revision 1.71 diff -u -r1.71 changes.html --- htdocs/gcc-9/changes.html 10 Jul 2019 13:03:55 - 1.71 +++ htd

Re: [PATCH] Define std::atomic_ref and std::atomic for C++20

2019-07-12 Thread Jonathan Wakely
On 11/07/19 20:45 +0100, Jonathan Wakely wrote: + // Repeat for volatile std::atomic + if constexpr (std::atomic::is_always_lock_free) Thanks to Uros for pointing out this typo. Fixed by the attached patch, committed to trunk. commit 991bdaf97870e2775a15314823759aec7fd79599 Author: redi Da

[committed] Fix thousands of testsuite failures for the c6x

2019-07-12 Thread Jeff Law
My tester reports ~22000 unexpected failures for the c6x port. The vast majority are due to a linker warning when the type of the .far section changes. It turns out we can emit two declarations for the .far section. One with @nobits, the other without. And since the .far section is a bss secti

Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)

2019-07-12 Thread Segher Boessenkool
On Thu, Jul 11, 2019 at 06:09:10PM +0100, Gaius Mulley wrote: > Segher Boessenkool writes: > > > On Thu, Jul 11, 2019 at 12:49:44PM +0100, Gaius Mulley wrote: > >> Matthias Klose writes: > >> > powerpc64le-linux-gnu fails to build (search for "unfinished" in the > >> > build log) > >> > > >> >

Re: [PATCH 0/3] add support for POD struct convention (PR 61339)

2019-07-12 Thread Jason Merrill
On Fri, Jul 12, 2019 at 11:14 AM Martin Sebor wrote: > > On 7/12/19 5:42 AM, Jonathan Wakely wrote: > > On 12/07/19 10:24 +0200, Jakub Jelinek wrote: > >> On Mon, Jul 08, 2019 at 03:56:51PM -0600, Martin Sebor wrote: > >>> A couple of GCC's Coding Conventions call to > >>> > >>> 1) Use the struc

Re: [PATCH 0/3] add support for POD struct convention (PR 61339)

2019-07-12 Thread Jonathan Wakely
On 12/07/19 09:14 -0600, Martin Sebor wrote: On 7/12/19 5:42 AM, Jonathan Wakely wrote: On 12/07/19 10:24 +0200, Jakub Jelinek wrote: On Mon, Jul 08, 2019 at 03:56:51PM -0600, Martin Sebor wrote: A couple of GCC's Coding Conventions call to   1) Use the struct keyword for plain old data (POD)

Re: [PATCH 0/3] add support for POD struct convention (PR 61339)

2019-07-12 Thread Martin Sebor
On 7/12/19 5:42 AM, Jonathan Wakely wrote: On 12/07/19 10:24 +0200, Jakub Jelinek wrote: On Mon, Jul 08, 2019 at 03:56:51PM -0600, Martin Sebor wrote: A couple of GCC's Coding Conventions call to   1) Use the struct keyword for plain old data (POD) types. https://www.gnu.org/software/gcc/

Re: [PATCH 0/3] add support for POD struct convention (PR 61339)

2019-07-12 Thread Jason Merrill
On Fri, Jul 12, 2019 at 7:42 AM Jonathan Wakely wrote: > > On 12/07/19 10:24 +0200, Jakub Jelinek wrote: > >On Mon, Jul 08, 2019 at 03:56:51PM -0600, Martin Sebor wrote: > >> A couple of GCC's Coding Conventions call to > >> > >> 1) Use the struct keyword for plain old data (POD) types. > >>

Re: [PATCH] Deprecate -frepo on gcc-9 branch (PR c++/91125).

2019-07-12 Thread Jason Merrill
On 7/12/19 8:44 AM, Martin Liška wrote: On 7/11/19 7:25 PM, Jason Merrill wrote: On 7/11/19 3:02 AM, Jakub Jelinek wrote: On Thu, Jul 11, 2019 at 08:48:52AM +0200, Martin Liška wrote: --- a/gcc/c-family/c-opts.c +++ b/gcc/c-family/c-opts.c @@ -501,6 +501,8 @@ c_common_handle_option (size_t sco

Re: [ARM/FDPIC v5 05/21] [ARM] FDPIC: Fix __do_global_dtors_aux and frame_dummy generation

2019-07-12 Thread Christophe Lyon
On Fri, 12 Jul 2019 at 08:06, Richard Sandiford wrote: > > Christophe Lyon writes: > > In FDPIC, we need to make sure __do_global_dtors_aux and frame_dummy > > are referenced by their address, not by pointers to the function > > descriptors. > > > > 2019-XX-XX Christophe Lyon > > Mickaël

Re: [PING^1][PATCH v4 3/3] PR80791 Consider doloop cmp use in ivopts

2019-07-12 Thread Segher Boessenkool
On Fri, Jul 12, 2019 at 02:11:16PM +0200, Richard Biener wrote: > Am I correct that doloop HW implementations are constrainted > by a decrement of one? GCC's doloop patterns are. Not all hardware is. Segher

Re: [ARM/FDPIC v5 02/21] [ARM] FDPIC: Handle arm*-*-uclinuxfdpiceabi in configure scripts

2019-07-12 Thread Richard Sandiford
Christophe Lyon writes: > On Fri, 12 Jul 2019 at 08:49, Richard Sandiford > wrote: >> >> Christophe Lyon writes: >> > The new arm-uclinuxfdpiceabi target behaves pretty much like >> > arm-linux-gnueabi. In order the enable the same set of features, we >> > have to update several configure script

Re: [ARM/FDPIC v5 02/21] [ARM] FDPIC: Handle arm*-*-uclinuxfdpiceabi in configure scripts

2019-07-12 Thread Christophe Lyon
On Fri, 12 Jul 2019 at 08:49, Richard Sandiford wrote: > > Christophe Lyon writes: > > The new arm-uclinuxfdpiceabi target behaves pretty much like > > arm-linux-gnueabi. In order the enable the same set of features, we > > have to update several configure scripts that generally match targets > >

Re: [PATCH] Deprecate -frepo on gcc-9 branch (PR c++/91125).

2019-07-12 Thread Martin Liška
On 7/11/19 7:25 PM, Jason Merrill wrote: > On 7/11/19 3:02 AM, Jakub Jelinek wrote: >> On Thu, Jul 11, 2019 at 08:48:52AM +0200, Martin Liška wrote: >>> --- a/gcc/c-family/c-opts.c >>> +++ b/gcc/c-family/c-opts.c >>> @@ -501,6 +501,8 @@ c_common_handle_option (size_t scode, const char *arg, >>> HO

[PATCH] Fix PR91145

2019-07-12 Thread Richard Biener
The following fixes the PR. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. 2019-07-12 Richard Biener PR tree-optimization/91145 * tree-vect-slp.c (vect_build_slp_tree_2): Fix reduction chain check. * gcc.dg/torture/pr91145.c: New te

Re: [PING^1][PATCH v4 3/3] PR80791 Consider doloop cmp use in ivopts

2019-07-12 Thread Richard Biener
On Wed, 10 Jul 2019, Kewen.Lin wrote: > Hi all, > > I'd like to gentle ping the below patch: > https://gcc.gnu.org/ml/gcc-patches/2019-06/msg01225.html > > The previous version for more context/background: > https://gcc.gnu.org/ml/gcc-patches/2019-06/msg01126.html > > Thanks a lot in advance!

Re: [PATCH] Define std::atomic_ref and std::atomic for C++20

2019-07-12 Thread Jonathan Wakely
On 12/07/19 12:20 +0100, Jonathan Wakely wrote: On 11/07/19 20:45 +0100, Jonathan Wakely wrote: This adds the new atomic types from C++2a, as proposed by P0019 and P0020. To reduce duplication the calls to the compiler's atomic built-ins are wrapped in new functions in the __atomic_impl namespac

Re: [PATCH] Define std::atomic_ref and std::atomic for C++20

2019-07-12 Thread Jonathan Wakely
On 11/07/19 20:45 +0100, Jonathan Wakely wrote: This adds the new atomic types from C++2a, as proposed by P0019 and P0020. To reduce duplication the calls to the compiler's atomic built-ins are wrapped in new functions in the __atomic_impl namespace. These functions are currently only used by std

[PATCH] Define __type_identity_t alias and use for string_view

2019-07-12 Thread Jonathan Wakely
This defines the equivalent of C++2a's std::type_identity_t alias but for use in C++11 and later. This can be used to replace __detail::__idt in the string_view headers, which previously used common_type_t because the one argument specialization of common_type_t was simply the identity transform (

Re: [PATCH 0/3] add support for POD struct convention (PR 61339)

2019-07-12 Thread Jonathan Wakely
On 12/07/19 10:24 +0200, Jakub Jelinek wrote: On Mon, Jul 08, 2019 at 03:56:51PM -0600, Martin Sebor wrote: A couple of GCC's Coding Conventions call to 1) Use the struct keyword for plain old data (POD) types. https://www.gnu.org/software/gcc/codingrationale.html#struct and 2) Use t

Re: [PATCH 2/5, OpenACC] Support Fortran optional arguments in the firstprivate clause

2019-07-12 Thread Jakub Jelinek
On Fri, Jul 12, 2019 at 12:36:13PM +0100, Kwok Cheung Yeung wrote: > --- a/gcc/omp-general.c > +++ b/gcc/omp-general.c > @@ -48,6 +48,20 @@ omp_find_clause (tree clauses, enum omp_clause_code kind) >return NULL_TREE; > } > > +/* Return true if DECL is a Fortran optional argument. */ > + > +b

[PATCH 5/5, OpenACC] Add tests for Fortran optional arguments in OpenACC 2.6

2019-07-12 Thread Kwok Cheung Yeung
This adds testcases exercising the use of optional arguments in the various OpenACC directives. Where applicable, both the present and non-present cases are tested, with an integer, array of integers and allocatable array of integers as the argument. libgomp/ * testsuite/libgom

[PATCH 4/5, OpenACC] Allow optional arguments to be used in the use_device OpenACC clause

2019-07-12 Thread Kwok Cheung Yeung
This patch fixes a similar situation that occurs with the use_device clause, where the lowering would result in a null dereference if applied to a non-present optional argument. This patch builds a conditional check that skips the dereference if the argument is non-present, and ensures that opt

[PATCH 3/5, OpenACC] Add support for allocatable arrays as optional arguments

2019-07-12 Thread Kwok Cheung Yeung
This patch allows allocatable arrays passed as Fortran optional arguments to be used in OpenACC. The GIMPLE code generated by the current lowering unconditionally attempts to access fields within the structure representing the array, resulting in a null dereference if the array is non-present.

[PATCH 2/5, OpenACC] Support Fortran optional arguments in the firstprivate clause

2019-07-12 Thread Kwok Cheung Yeung
Reference types used by Fortran often need to be treated specially in the OACC lowering to deal with the referenced object as well as the reference itself. However, as optional arguments can be null, they are pointer types rather than reference types, so the code to detect these situations need

[PATCH 1/5, OpenACC] Allow NULL as an argument to OpenACC 2.6 directives

2019-07-12 Thread Kwok Cheung Yeung
Fortran pass-by-reference optional arguments behave much like normal Fortran arguments when lowered to GENERIC/GIMPLE, except they can be null (representing a non-present argument). Some parts of libgomp (those dealing with updating mappings) currently do not expect to take a null address and

[PATCH 0/5, OpenACC] Add support for Fortran optional arguments in OpenACC

2019-07-12 Thread Kwok Cheung Yeung
This patchset allows the use of Fortran optional arguments in OpenACC programs in accordance with section 2.17 of the OpenACC 2.6 specification. These patches were originally posted at https://gcc.gnu.org/ml/gcc-patches/2019-01/msg01750.html for the OG8 branch. This version is targeted at trun

[PATCH] Generalized predicate/condition for parameter reference in IPA (PR ipa/91088)

2019-07-12 Thread Feng Xue OS
Current IPA-cp only generates cost-evaluating predicate for conditional statement like "if (param cmp const_val)", it is too simple and conservative. This patch generalizes the process to handle the form as T(param), a mathematical transformation on the function parameter, in which the parameter

Re: [PATCH] Define std::atomic_ref and std::atomic for C++20

2019-07-12 Thread Jonathan Wakely
On 11/07/19 20:45 +0100, Jonathan Wakely wrote: This adds the new atomic types from C++2a, as proposed by P0019 and P0020. To reduce duplication the calls to the compiler's atomic built-ins are wrapped in new functions in the __atomic_impl namespace. These functions are currently only used by std

Re: Prevent tree-ssa-dce.c from deleting stores at -Og

2019-07-12 Thread Richard Sandiford
Richard Biener writes: > On Mon, Jul 8, 2019 at 4:41 PM Richard Sandiford > wrote: >> >> Richard Biener writes: >> > On Sun, Jul 7, 2019 at 9:07 PM Jeff Law wrote: >> >> >> >> On 7/7/19 3:45 AM, Richard Sandiford wrote: >> >> > DCE tries to delete dead stores to local data and also tries to ins

Re: allow EH to escape from GIMPLE_EH_ELSE ELSE block

2019-07-12 Thread Richard Biener
On Thu, Jul 11, 2019 at 12:44 PM Alexandre Oliva wrote: > > ... and here's a patch that uses a try/finally/else gimplefe test to > demonstrate the GIMPLE_EH_ELSE lowering problem (might_throw3 is tagged > as [LP 1] rather than [LP 2]), and fixes it. > > Regstrapped on x86_64-linux-gnu. Ok to inst

Re: allow EH to escape from GIMPLE_EH_ELSE ELSE block

2019-07-12 Thread Richard Biener
On Thu, Jul 11, 2019 at 12:41 PM Alexandre Oliva wrote: > > On Jul 4, 2019, Richard Biener wrote: > > > Yeah. For other stuff we're simply looking at CPP_NAME and > > string-matching, see c_parser_gimple_compound_statement > > where you'd probably hook this into. > > Here's a working patch that

Re: Make ifcvt clean up dead comparisons

2019-07-12 Thread Richard Sandiford
Richard Biener writes: > On Fri, Jul 12, 2019 at 12:28 PM Richard Sandiford > wrote: >> >> Richard Biener writes: >> > On Fri, Jul 12, 2019 at 10:00 AM Richard Sandiford >> > wrote: >> >> >> >> This change is needed to avoid a regression in gcc.dg/ifcvt-3.c >> >> for a later patch. Without it,

Re: Rewrite some jump.c routines to use flags

2019-07-12 Thread Richard Sandiford
Eric Botcazou writes: >> ...trapping on signalling NaNs is enough for the field to be true. > > So what's the point in encoding this? The main distinction, and the only one > relevant for the RTL middle-end, is whether the operator traps on quiet NaNs > since this can change the comparison inst

Re: Make ifcvt clean up dead comparisons

2019-07-12 Thread Richard Biener
On Fri, Jul 12, 2019 at 12:28 PM Richard Sandiford wrote: > > Richard Biener writes: > > On Fri, Jul 12, 2019 at 10:00 AM Richard Sandiford > > wrote: > >> > >> This change is needed to avoid a regression in gcc.dg/ifcvt-3.c > >> for a later patch. Without it, we enter CSE with a dead compariso

Re: Make ifcvt clean up dead comparisons

2019-07-12 Thread Richard Sandiford
Richard Biener writes: > On Fri, Jul 12, 2019 at 10:00 AM Richard Sandiford > wrote: >> >> This change is needed to avoid a regression in gcc.dg/ifcvt-3.c >> for a later patch. Without it, we enter CSE with a dead comparison left >> by if-conversion and then eliminate the second (live) compariso

Re: Rewrite some jump.c routines to use flags

2019-07-12 Thread Eric Botcazou
> ...trapping on signalling NaNs is enough for the field to be true. So what's the point in encoding this? The main distinction, and the only one relevant for the RTL middle-end, is whether the operator traps on quiet NaNs since this can change the comparison instruction emitted by the back-end

Re: [RFC][tree-vect]PR 88915: Further vectorize second loop when versioning

2019-07-12 Thread Richard Biener
On Thu, 11 Jul 2019, Andre Vieira (lists) wrote: > Hi Richard(s), > > I am trying to tackle PR88915 and get GCC to further vectorize the "fallback" > loop when doing loop versioning as it does when loop versioning is not > required. > > I have a prototype patch that needs further testing, but at

Fix PR rtl-optimization/91136

2019-07-12 Thread Eric Botcazou
This is another installment in the famous series "how can this have worked for so long?". The delayed branches scheduling pass, aka dbr in reorg.c, uses its own dataflow algorithm implemented in resource.c to do liveness analysis after starting from seeds obtained from DF. It's a forward scan

Re: Make nonoverlapping_component_refs_since_match_p work with non-trivial MEM_REFs and TMRs

2019-07-12 Thread Richard Biener
On Thu, 11 Jul 2019, Jan Hubicka wrote: > > > On Thu, 11 Jul 2019, Jan Hubicka wrote: > > > > > > > Hi, > > > > this patch makes nonoverlapping_component_refs_since_match_p to accept > > > > paths with non-trivial MEM_REFs and TMRs assuming that they have same > > > > semantics. > > > > > > Hmm.

Re: Relax vector_builder::elt sanity check

2019-07-12 Thread Richard Biener
On Fri, Jul 12, 2019 at 9:49 AM Richard Sandiford wrote: > > I'd made it a precondition of vector_builder::elt that the encoding > must have been fully populated and that all implicit elements are > therefore defined. But for one of the AArch64 patches I'm working on, > it'd be convenient to be a

Re: [PATCH V5] PR88497 - Extend reassoc for vector bit_field_ref

2019-07-12 Thread Richard Biener
On Thu, 11 Jul 2019, Kewen.Lin wrote: > Hi Richard, > > on 2019/7/10 下午7:50, Richard Biener wrote: > > On Mon, 8 Jul 2019, Kewen.Lin wrote: > > > > > > + tree rhs = gimple_assign_rhs1 (oe1def); > > + tree vec = TREE_OPERAND (rhs, 0); > > + tree vec_type = TREE_TYPE (vec); > > + >

Re: Rewrite some jump.c routines to use flags

2019-07-12 Thread Richard Sandiford
Eric Botcazou writes: >> +/* Invoke T (CODE, ORDER, SIGNEDNESS, CAN_TRAP) for each comparison, where: >> + >> + - CODE is the rtl comparison code >> + - ORDER is the OR of the conditions under which CODE returns true >> + - SIGNEDNESS is the signedness of COND, or 0 if it is sign-agnostic >>

Re: Make ifcvt clean up dead comparisons

2019-07-12 Thread Richard Biener
On Fri, Jul 12, 2019 at 10:00 AM Richard Sandiford wrote: > > This change is needed to avoid a regression in gcc.dg/ifcvt-3.c > for a later patch. Without it, we enter CSE with a dead comparison left > by if-conversion and then eliminate the second (live) comparison in > favour of the dead one.

Re: [PATCH] add --param ssa-name-def-chain-limit

2019-07-12 Thread Richard Biener
On Thu, Jul 11, 2019 at 7:43 PM Martin Sebor wrote: > > Attached is a patch that adds a new parameter to limit the number > of SSA_NAME assignments for GCC to follow in iterative or recursive > algorithms. Purely as a proof of concept the patch introduces > the parameter into -Warray-bounds where

Re: [patch] Small improvements to coverage info (4/n)

2019-07-12 Thread Richard Biener
On Thu, Jul 11, 2019 at 7:04 PM Eric Botcazou wrote: > > > After your patch does behavior change when trying to break on a line > > with a return stmt inside a debugger? > > Note that every patch in the series was tested against GDB too, so hopefully > this would have been caught... But the answe

Re: Rewrite some jump.c routines to use flags

2019-07-12 Thread Eric Botcazou
> +/* Invoke T (CODE, ORDER, SIGNEDNESS, CAN_TRAP) for each comparison, where: > + > + - CODE is the rtl comparison code > + - ORDER is the OR of the conditions under which CODE returns true > + - SIGNEDNESS is the signedness of COND, or 0 if it is sign-agnostic > + - CAN_TRAP is true if CO

Re: [PATCH] Define std::atomic_ref and std::atomic for C++20

2019-07-12 Thread Jonathan Wakely
On 11/07/19 20:45 +0100, Jonathan Wakely wrote: This adds the new atomic types from C++2a, as proposed by P0019 and P0020. To reduce duplication the calls to the compiler's atomic built-ins are wrapped in new functions in the __atomic_impl namespace. These functions are currently only used by std

[PATCH v2] Missed function specialization + partial devirtualization

2019-07-12 Thread Xiong Hu Luo
This patch aims to fix PR69678 caused by PGO indirect call profiling performance issues. Currently the default profile can only use the single indirect target that called more than 50%. This patch leverages multiple indirect targets use in LTO-WPA and LTO-LTRANS stage, as a result, function specia

[PATCH] Setup predicate for switch default case in IPA (PR ipa/91089)

2019-07-12 Thread Feng Xue OS
IPA does not construct executability predicate for default case of switch statement. So execution cost of default case is not properly evaluated in IPA-cp, this might prevent function clone for function containing switch statement, if certain non-default case is proved to be executed after const

Re: [PATCH 0/3] add support for POD struct convention (PR 61339)

2019-07-12 Thread Jakub Jelinek
On Mon, Jul 08, 2019 at 03:56:51PM -0600, Martin Sebor wrote: > A couple of GCC's Coding Conventions call to > > 1) Use the struct keyword for plain old data (POD) types. > https://www.gnu.org/software/gcc/codingrationale.html#struct > > and > > 2) Use the class keyword for non-POD type

Ping: [06/11] [mips] Fix ambiguous .md attribute uses

2019-07-12 Thread Richard Sandiford
Ping. I think this is the only one of the series left. (I should probably have treated the patch as obvious, but it always seems wrong to do that retrospectively.) Thanks, Richard Richard Sandiford writes: > This patch is part of a series that fixes ambiguous attribute > uses in .md files, i.e

Add more rtx comparison folds

2019-07-12 Thread Richard Sandiford
This patch adds rtx folds for: (and (cmp1 x y) (cmp2 x y)) -> (cmp3 x y) (ior (cmp1 x y) (cmp2 x y)) -> (cmp3 x y) (if_then_else (cmp1 x y) (cmp2 x y) (const_int 0)) -> (and (cmp1 x y) (cmp2 x y)) As always, there are plenty of other things that could be added. This just happened to be

Rewrite some jump.c routines to use flags

2019-07-12 Thread Richard Sandiford
This patch rewrites some jump.c routines to operate on flags that describe comparisons rather than handling each comparison code separately. This in turn makes it easier to add some new routines in the next patch. Maybe the change isn't worth it for swap_condition, unsigned_condition and signed_c

Make ifcvt clean up dead comparisons

2019-07-12 Thread Richard Sandiford
This change is needed to avoid a regression in gcc.dg/ifcvt-3.c for a later patch. Without it, we enter CSE with a dead comparison left by if-conversion and then eliminate the second (live) comparison in favour of the dead one. That's functionally correct in itself, but it meant that we'd combine

[committed] Add OpenMP 5.0 order(concurrent) clause parsing support

2019-07-12 Thread Jakub Jelinek
Hi! This adds parsing support for a new clause, but currently just ignores it besides checking some restrictions (will add further ones later). For worksharing loop the spec says: "If an order(concurrent) clause is present, then after assigning the iterations of the associated loops to their resp

[committed] Support multiple operand counts for .md @ patterns

2019-07-12 Thread Richard Sandiford
This patch extends the support for "@..." pattern names so that the patterns can have different numbers of operands. This allows things like binary and ternary operations to be handled in a consistent way, a bit like optabs. The generators assert that the number of operands passed is correct for

Relax vector_builder::elt sanity check

2019-07-12 Thread Richard Sandiford
I'd made it a precondition of vector_builder::elt that the encoding must have been fully populated and that all implicit elements are therefore defined. But for one of the AArch64 patches I'm working on, it'd be convenient to be able to look back at previous elements while building up the encoding

Re: Rework constant subreg folds and handle more variable-length cases

2019-07-12 Thread Richard Sandiford
Richard Sandiford writes: > This patch rewrites the way simplify_subreg handles constants. > It uses similar native_encode/native_decode routines to the > tree-level handling of VIEW_CONVERT_EXPR, meaning that we can > move between rtx constants and the target memory image of them. > > The main po