[PATCH][RFC] Add new ipa-reorder pass

2019-09-19 Thread Martin Liška
Hi. Function reordering has been around for quite some time and a naive implementation was also part of my diploma thesis some time ago. Currently, the GCC can reorder function based on first execution, which happens with PGO and LTO of course. Known limitation is that the order is preserved only

Re: [PATCH] Remove vectorizer reduction operand swapping

2019-09-19 Thread Richard Biener
On Thu, 19 Sep 2019, Richard Sandiford wrote: > Richard Biener writes: > > It shouldn't be neccessary. > > SVE is the counter-example :-) But the fix is simpler than the code > you removed, so it's still a net win. Yeah, I meant it shouldn't be necessary to swap operands of the original

Re: [PATCH][ARM] Remove support for MULS

2019-09-19 Thread Richard Earnshaw (lists)
On 18/09/2019 17:31, Kyrill Tkachov wrote: Hi Wilco, On 9/9/19 6:07 PM, Wilco Dijkstra wrote: ping Remove various MULS/MLAS patterns which are enabled when optimizing for  size.  However the codesize gain from these patterns is so minimal that  there is no point in keeping them. I disagree.

[PATCH] Speed up qsort in IPA ICF

2019-09-19 Thread Martin Liška
Hi. As Alexander pointed out, the sort_congruence_class_groups_by_decl_uid is the most expensive qsort operator in tramp3d compilation. It does unfortunate 7 pointer dereferences via: DECL_UID (classes[i]->classes[0]->members[0]->decl). I'm suggesting to cache that in congruence_class_group.

Re: [PATCH] Remove vectorizer reduction operand swapping

2019-09-19 Thread Richard Sandiford
Richard Biener writes: > It shouldn't be neccessary. SVE is the counter-example :-) But the fix is simpler than the code you removed, so it's still a net win. Fixes various vect.exp and aarch64-sve.exp ICEs. OK if it passes proper testing? Thanks, Richard 2019-09-19 Richard Sandiford

[PATCH] Remove operand swapping from reduction vectorization (SLP)

2019-09-19 Thread Richard Biener
Here's the SLP part. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2019-09-19 Richard Biener * tree-parloops.c (parloops_is_slp_reduction): Do not set LOOP_VINFO_OPERANDS_SWAPPED. (parloops_is_simple_reduction): Likewise. *

Re: [PATCH][ARM] Cleanup multiply patterns

2019-09-19 Thread Kyrill Tkachov
On 9/18/19 7:19 PM, Wilco Dijkstra wrote: Hi Kyrill,  + (mult:SI (match_operand:SI 3 "s_register_operand" "r")  +  (match_operand:SI 2 "s_register_operand" "r"] Looks like we'll want to mark operand 2 here with '%' as well? That doesn't make any difference

Re: [patch, testsuite, arm] Fix ICE in gcc.dg/gimplefe-28.c

2019-09-19 Thread Kyrill Tkachov
Hi Sandra, Mike, On 9/18/19 7:14 PM, Mike Stump wrote: On Sep 13, 2019, at 12:06 PM, Sandra Loosemore wrote: > > For the default multilib on arm-none-eabi, gcc.dg/gimplefe-28 has been getting an ICE because, while the target-supports infrastructure is probing to see if it can add the

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

2019-09-19 Thread Richard Sandiford
Jeff Law writes: > On 7/12/19 1:44 AM, Richard Sandiford wrote: >> 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 >>>

Re: [PATCH 2/4] New parameter manipulation infrastructure

2019-09-19 Thread Martin Jambor
Hi, On Fri, Sep 13 2019, Jan Hubicka wrote: >> 2019-08-20 Martin Jambor >> >> * Makefile.in (GTFILES): Added ipa-param-manipulation.h. >> * cgraph.h (ipa_replace_map): Removed fields old_tree, replace_p >> and ref_p, added fields param_adjustments and performed_splits.

[COMMITTED][GCC9] Backport RISC-V: Fix bad insn splits with paradoxical subregs.

2019-09-19 Thread Kito Cheng
This patch fix PR target/91635, fixing wrong code gen for RISC-V. From 52e32e2f82b4fe09c253e230c4fe321a0341aae7 Mon Sep 17 00:00:00 2001 From: kito Date: Thu, 19 Sep 2019 06:38:23 + Subject: [PATCH] RISC-V: Fix bad insn splits with paradoxical subregs. Shifting by more than the size of a

Re: [PATCH][ARM] Enable code hoisting with -Os (PR80155)

2019-09-19 Thread Richard Biener
On Wed, Sep 18, 2019 at 6:47 PM Prathamesh Kulkarni wrote: > > On Wed, 18 Sep 2019 at 01:46, Richard Biener > wrote: > > > > On Tue, Sep 17, 2019 at 7:18 PM Wilco Dijkstra > > wrote: > > > > > > Hi Richard, > > > > > > > The issue with the bugzilla is that it lacked appropriate testcase(s) >

Re: [PATCH] Speed up qsort in IPA ICF

2019-09-19 Thread Richard Biener
On Thu, Sep 19, 2019 at 11:06 AM Martin Liška wrote: > > Hi. > > As Alexander pointed out, the sort_congruence_class_groups_by_decl_uid is the > most > expensive qsort operator in tramp3d compilation. It does unfortunate 7 > pointer dereferences > via: DECL_UID

Re: [PATCH] Speed up qsort in IPA ICF

2019-09-19 Thread Richard Biener
On Thu, Sep 19, 2019 at 3:15 PM Alexander Monakov wrote: > > On Thu, 19 Sep 2019, Richard Biener wrote: > > > > Good point, there's a tested patch. > > > > OK. > > Hold on, is the new comparator really correct? > > > @@ -3384,20 +3372,11 @@ sort_congruence_classes_by_decl_uid (const void *a, >

[Ada] Infinite loop with concatenation and aspect

2019-09-19 Thread Pierre-Marie de Rodat
This patch fixes a bug where an array object initialized with a concatenation, and that has an aspect_specification for Alignment, causes the compiler goes into an infinite loop. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-09-19 Bob Duff gcc/ada/ * exp_ch3.adb

[Ada] Improve handling of explicit by-reference mechanism

2019-09-19 Thread Pierre-Marie de Rodat
This improves the handling of an explicit by-reference passing mechanism specified by means of the GNAT pragma Export_Function. This device sort of circumvents the rules of the language for the by-reference passing mechanism and it's then up to the programmer to ensure that the actual parameter

[Ada] gnatxref: infinite loop on symbols not found

2019-09-19 Thread Pierre-Marie de Rodat
This patch fixes a bug in which if a symbol is not found, gnatxref can sometimes enter an infinite loop. No impact on compilation. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-09-19 Bob Duff gcc/ada/ * xref_lib.adb (Get_Symbol_Name): If we reach EOF in the first

Re: [PATCH][ARM] Add logical DImode expanders

2019-09-19 Thread Richard Earnshaw (lists)
On 18/09/2019 20:55, Wilco Dijkstra wrote: Hi Kyrill, We should be able to "compress" the above 3 patterns into one using code iterators. Good point, that makes sense. I've committed this: ChangeLog: 2019-09-18 Wilco Dijkstra PR target/91738 * config/arm/arm.md (di3):

[PATCH, Fortran] Character type names in errors and warnings - new version for review

2019-09-19 Thread Mark Eggleston
Original thread: https://gcc.gnu.org/ml/fortran/2019-09/msg00024.html The original patch introduced a new field in gfc_typespec called length to be used only for character literals. At the time I felt that this was a bit of kludge.  As a results of comments from Janne Blomqvist I investigated

Re: [PATCH] Speed up qsort in IPA ICF

2019-09-19 Thread Alexander Monakov
On Thu, 19 Sep 2019, Richard Biener wrote: > > Good point, there's a tested patch. > > OK. Hold on, is the new comparator really correct? @@ -3384,20 +3372,11 @@ sort_congruence_classes_by_decl_uid (const void *a, const void *b) static int sort_congruence_class_groups_by_decl_uid (const

[Ada] New routine GNAT.Sockets.Create_Socket_Pair

2019-09-19 Thread Pierre-Marie de Rodat
New routine to create 2 connected sockets. This routine is analog of the UNIX system call socketpair. On UNIX platforms it is implemented on the base of socketpair. On other platforms it is implemented by conecting network sockets over loopback interface. Tested on x86_64-pc-linux-gnu, committed

[Ada] Remove duplicated routines for getting homonym number

2019-09-19 Thread Pierre-Marie de Rodat
Routines Homonym_Number and Get_Homonym_Number were exactly the same, except for minor style differences. Keep the one in Exp_Util; remove the one in Exp_Dbug. No test attached, because semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-09-19 Piotr Trojanek

[Ada] Crash on predicate in full view in a generic unit

2019-09-19 Thread Pierre-Marie de Rodat
This patch fixes a compiler abort on a dynamic predicate applied to the full view of a type in a generic package declaration, when the expression for the predicate is a conditionql expression that contains references to components of the full view of the type. Tested on x86_64-pc-linux-gnu,

[Ada] Use declared type for deciding on SPARK pointer rules

2019-09-19 Thread Pierre-Marie de Rodat
A constant of pointer type is considered as mutable in SPARK, according to SPARK RM 3.10, but this should be based on the declared type of the constant instead of its underlying type. There is no impact on compilation hence no test. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-09-19

[Ada] Fix bogus "too late" error with nested generics and inlining

2019-09-19 Thread Pierre-Marie de Rodat
This prevents the compiler from issuing a bogus error about a constant whose full declaration appears too late, if it is declared in a nested generic package and instantiated in another nested instantiation, when the instantiations are done in a unit withed from the main unit and containing an

[Ada] Accept concatentation arguments to pragma Annotate

2019-09-19 Thread Pierre-Marie de Rodat
In cases where pragma Annotate accepts a string literal as an argument, we now also accept a concatenation of string literals. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-09-19 Steve Baird gcc/ada/ * sem_prag.adb (Preferred_String_Type): A new function. Given an

[Ada] Move SPARK borrow-checker to gnat2why codebase

2019-09-19 Thread Pierre-Marie de Rodat
Unit sem_spark was implementing the borrow-checker for the support of ownership pointers in SPARK. It has been moved to gnat2why codebase to facilitate its evolution and allow the more powerful flow analysis to provide its results for better analysis on pointers. Tested on x86_64-pc-linux-gnu,

Re: [PATCH 5/9] Come up with an abstraction.

2019-09-19 Thread Richard Biener
On Wed, Sep 18, 2019 at 9:56 AM Martin Liška wrote: > > Hello. > > Ok, so the current IPA ICF transformation is being blocked by the > patch 2/9 (about FIELD_DECL). I asked Honza for a help here. > In the meantime, can you Richi make an opinion about the part 5 which > is about the interaction in

[PATCH] Remove vect_is_slp_reduction

2019-09-19 Thread Richard Biener
This implements vect_is_slp_reduction in terms of the check_reduction_path detected SCC. Bootstrap & regtest running on x86_64-unknown-linux-gnu. Richard. 2019-09-19 Richard Biener * tree-vect-loop.c (vect_is_slp_reduction): Remove. (check_reduction_path): New overload

[Ada] Fix bogus visibility error with nested generics and inlining

2019-09-19 Thread Pierre-Marie de Rodat
This prevents the compiler from issuing a bogus error about the visibility of an operator in an instantiation of a nested generic package which is itself used as an actual of an instantiation of another generic package, when the instantiations are done in a unit withed from the main unit and

Re: [PATCH] Speed up qsort in IPA ICF

2019-09-19 Thread Martin Liška
On 9/19/19 3:18 PM, Richard Biener wrote: > On Thu, Sep 19, 2019 at 3:15 PM Alexander Monakov wrote: >> >> On Thu, 19 Sep 2019, Richard Biener wrote: >> Good point, there's a tested patch. >>> >>> OK. >> >> Hold on, is the new comparator really correct? >> >> >> @@ -3384,20 +3372,11 @@

[PATCH] [og9] Add 'ephemeral' parameter to GOMP_OFFLOAD_openacc_async_host2dev

2019-09-19 Thread Julian Brown
This patch fixes a build failure in the NVPTX libgomp plugin after the EPHEMERAL parameter was added to the GOMP_OFFLOAD_openacc_async_host2dev plugin entry point. So far the parameter is ignored, which is no change from the previous behaviour but which I think may lead to a data race in some

[Patch,committed][OG9] Update dg-* in to reduce test failures

2019-09-19 Thread Tobias Burnus
Hi all, the gfortran.dg/goacc/kernels-decompose-1.f95 change is just "note:" to "optimized:". It reduces the fails a bit – but I still see some XPASS and FAIL, which I haven't checked. The other two files have an additional output which looks OK and, hence, has been added to the expected

[PATCH V4] Extend IPA-CP to support arithmetically-computed value-passing on by-ref argument (PR ipa/91682)

2019-09-19 Thread Feng Xue OS
Fix a bug on unary/binary operation check. Feng --- diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c index 33d52fe5537..f218f1093b8 100644 --- a/gcc/ipa-cp.c +++ b/gcc/ipa-cp.c @@ -1244,23 +1244,23 @@ initialize_node_lattices (struct cgraph_node *node) } } -/* Return the result of a (possibly

[PATCH] Fix PR91812

2019-09-19 Thread Richard Biener
Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. 2019-09-19 Richard Biener PR tree-optimization/91812 * tree-ssa-phiprop.c (propagate_with_phi): Do not replace volatile loads. * gcc.dg/torture/pr91812.c: New testcase. Index:

Re: [PATCH] Speed up qsort in IPA ICF

2019-09-19 Thread Martin Liška
On 9/19/19 1:01 PM, Richard Biener wrote: > On Thu, Sep 19, 2019 at 11:06 AM Martin Liška wrote: >> >> Hi. >> >> As Alexander pointed out, the sort_congruence_class_groups_by_decl_uid is >> the most >> expensive qsort operator in tramp3d compilation. It does unfortunate 7 >> pointer

Re: [PATCH][ARM] Add logical DImode expanders

2019-09-19 Thread Wilco Dijkstra
Hi Richard, > except we can do better than this... > (see below).  With that change, this just becomes di3 >> +(define_code_attr logical_op [(ior "ior") (xor "xor") (and "and")]) > > These should just be added to the existing 'optab' attribute, there's no > need for an additional attribute. >>

Re: [PATCH][ARM] Enable code hoisting with -Os (PR80155)

2019-09-19 Thread Richard Biener
On Thu, Sep 19, 2019 at 3:28 AM Prathamesh Kulkarni wrote: > > On Wed, 18 Sep 2019 at 22:17, Prathamesh Kulkarni > wrote: > > > > On Wed, 18 Sep 2019 at 01:46, Richard Biener > > wrote: > > > > > > On Tue, Sep 17, 2019 at 7:18 PM Wilco Dijkstra > > > wrote: > > > > > > > > Hi Richard, > > >

[Ada] Disable inlining of traversal function in GNATprove

2019-09-19 Thread Pierre-Marie de Rodat
Traversal functions as defined in SPARK RM 3.10 should not be inlined for analysis in GNATprove, as this changes the ownership behavior. Disable the inlining performed in GNATprove on functions which could be interpreted as such. There is no impact on compilation and thus no test. Tested on

[Ada] Fix run-time segfault with derived access-to-subprogram type

2019-09-19 Thread Pierre-Marie de Rodat
This fixes a segfault at run time for the call to a local subprogram through an access value if the type of this access value is derived from an initial access-to-subprogram type and the access value was originally obtained with the initial type. Tested on x86_64-pc-linux-gnu, committed on trunk

[Ada] Memory leak with 'Range of a function call in a loop

2019-09-19 Thread Pierre-Marie de Rodat
If a for loop starts with "for X in F (...)'Range loop", where F is a function returning an unconstrained array, then memory is leaked. This patch fixes that bug. Running these commands: gnatmake -q -f main.adb main On the following sources: with Text_IO; use Text_IO; package P is

[Ada] Get rid of useless temporary for slice in overaligned record type

2019-09-19 Thread Pierre-Marie de Rodat
This fixes a recent code quality regression for targets that do not require the strict alignment of memory accesses: the compiler would generate a useless temporary for a slice of an array component in an overaligned record type. Running these commands: gcc -c p.adb -gnatws -gnatD grep loop

[Ada] Fix copy operation with private discriminated record type

2019-09-19 Thread Pierre-Marie de Rodat
This prevents the object code from reading too many bytes from the source for a copy operation involving a private discriminated record type with default discriminants and generated for the assignment of an aggregate to a variable or the initialization of a constant. The front-end already knows

Re: [PATCH, AArch64 v4 0/6] LSE atomics out-of-line

2019-09-19 Thread Richard Henderson
On 9/18/19 5:58 AM, Kyrill Tkachov wrote: > Thanks for this. > > I've bootstrapped and tested this patch series on systems with and without LSE > support, both with and without patch [6/6], so 4 setups in total. > > It all looks clean for me. > > I'm favour of this series going in (modulo patch

Re: [PATCH, Fortran] Optionally suppress no-automatic overwrites recursive warning - for review

2019-09-19 Thread Tobias Burnus
Hi Mark, On 9/19/19 3:40 PM, Mark Eggleston wrote: The following warning is produced when -fno-automatic and -frecursive are used at the same time: f951: Warning: Flag '-fno-automatic' overwrites '-frecursive' This patch allows the warning to be switched off using a new option,

[SVE] PR91532

2019-09-19 Thread Prathamesh Kulkarni
Hi, For PR91532, the dead store is trivially deleted if we place dse pass between ifcvt and vect. Would it be OK to add another instance of dse there ? Or should we add an ad-hoc "basic-block dse" sub-pass to ifcvt that will clean up the dead store ? Thanks, Prathamesh

Re: [Ada] Fix 32/64bit mistake on SYSTEM_INFO component in s-win32

2019-09-19 Thread Rainer Orth
Hi Iain, >> On 18 Sep 2019, at 09:39, Pierre-Marie de Rodat wrote: >> > >> gcc/testsuite/ >> >> * gnat.dg/system_info1.adb: New testcase. > > This new test fails everywhere on Darwin, which doesn’t have an > implementation for > System.Task_Info.Number_Of_Processors > > Given > "pragma

[PATCH][x86] Fix PR91814

2019-09-19 Thread Richard Biener
Boostrapped and tested on x86_64-unknown-linux-gnu. OK? Thanks, Richard. 2019-09-19 Richard Biener PR target/91814 * config/i386/i386-features.c (gen_gpr_to_xmm_move_src): Force operand to a register if it isn't nonimmediate_operand. Index:

Re: [PATCH 3/4] New IPA-SRA implementation

2019-09-19 Thread Martin Jambor
Hi, On Fri, Sep 13 2019, Jan Hubicka wrote: >> This patch actually adds the analysis bits of IPA-SRA - both the >> function summary generation and the interprocedural analysis and >> decision stage. The transformation itself then happens in the call >> graph cloning infrastructure changes which

Re: [Ada] Fix 32/64bit mistake on SYSTEM_INFO component in s-win32

2019-09-19 Thread Olivier Hainque
Hello Iain & Rainer, Thanks for the heads up and sorry for the disruption from this one. > On 19 Sep 2019, at 17:02, Iain Sandoe wrote: > >> Given that the test cannot compile on anything but *-*-linux* and >> *-*-mingw*, I'd rather restrict the test to those two (or more targets >> that

Re: [PATCH] Come up with debug counter for store-merging.

2019-09-19 Thread Bernhard Reutner-Fischer
On Wed, 18 Sep 2019 11:01:59 +0200 Richard Biener wrote: > On Wed, Sep 18, 2019 at 9:22 AM Martin Liška wrote: > > > > Hi. > > > > After I spent quite some time with PR91758, I would like > > to see a debug counter in store merging for the next time. > > > > Ready to be installed? > OK. > @@

Re: [Ada] Fix 32/64bit mistake on SYSTEM_INFO component in s-win32

2019-09-19 Thread Iain Sandoe
Hi Rainer, > On 19 Sep 2019, at 15:51, Rainer Orth wrote: > >>> On 18 Sep 2019, at 09:39, Pierre-Marie de Rodat wrote: >>> >> >>> gcc/testsuite/ >>> >>> * gnat.dg/system_info1.adb: New testcase. >> >> This new test fails everywhere on Darwin, which doesn’t have an >> implementation

Re: [PATCH][x86] Fix PR91814

2019-09-19 Thread Uros Bizjak
On Thu, Sep 19, 2019 at 5:30 PM Richard Biener wrote: > > > Boostrapped and tested on x86_64-unknown-linux-gnu. > > OK? OK. Thanks, Uros. > Thanks, > Richard. > > 2019-09-19 Richard Biener > > PR target/91814 > * config/i386/i386-features.c (gen_gpr_to_xmm_move_src): >

Re: [ARM/FDPIC v6 13/24] [ARM] FDPIC: Force LSB bit for PC in Cortex-M architecture

2019-09-19 Thread Christophe Lyon
On Tue, 17 Sep 2019 at 14:08, Christophe Lyon wrote: > > On 17/09/2019 13:38, Wilco Dijkstra wrote: > > Hi Christophe, > > > > Can you explain this in more detail - it doesn't make sense to me to force > > the > > Thumb bit during unwinding since it should already be correct, even on a > >

Re: [SVE] PR91532

2019-09-19 Thread Richard Biener
On Thu, 19 Sep 2019, Prathamesh Kulkarni wrote: > Hi, > For PR91532, the dead store is trivially deleted if we place dse pass > between ifcvt and vect. Would it be OK to add another instance of dse there ? > Or should we add an ad-hoc "basic-block dse" sub-pass to ifcvt that > will clean up the

Re: [ARM/FDPIC v6 13/24] [ARM] FDPIC: Force LSB bit for PC in Cortex-M architecture

2019-09-19 Thread Kyrill Tkachov
On 9/19/19 4:13 PM, Christophe Lyon wrote: On Tue, 17 Sep 2019 at 14:08, Christophe Lyon wrote: > > On 17/09/2019 13:38, Wilco Dijkstra wrote: > > Hi Christophe, > > > > Can you explain this in more detail - it doesn't make sense to me to force the > > Thumb bit during unwinding since it

Re: [PATCH][ARM] Add logical DImode expanders

2019-09-19 Thread Richard Earnshaw (lists)
On 19/09/2019 15:26, Wilco Dijkstra wrote: Hi Richard, except we can do better than this... (see below).  With that change, this just becomes di3 +(define_code_attr logical_op [(ior "ior") (xor "xor") (and "and")]) These should just be added to the existing 'optab' attribute, there's no

Re: [PATCH, nvptx] Expand OpenACC child function arguments to use CUDA params space

2019-09-19 Thread Thomas Schwinge
Hi Chung-Lin! On 2019-09-10T19:41:59+0800, Chung-Lin Tang wrote: > this is a completely new implementation of an earlier optimization > that Cesar submitted: > https://gcc.gnu.org/ml/gcc-patches/2017-12/msg01202.html Thanks for your re-work! > The objective is to transform the original

Re: [Ada] Fix 32/64bit mistake on SYSTEM_INFO component in s-win32

2019-09-19 Thread Iain Sandoe
Hi Folks, > On 18 Sep 2019, at 09:39, Pierre-Marie de Rodat wrote: > > gcc/testsuite/ > > * gnat.dg/system_info1.adb: New testcase. This new test fails everywhere on Darwin, which doesn’t have an implementation for System.Task_Info.Number_Of_Processors Given "pragma Obsolescent

Re: [PATCH][ARM] Remove support for MULS

2019-09-19 Thread Wilco Dijkstra
Hi Richard, Kyrill, >> I disagree. If they still trigger and generate better code than without >> we should keep them. > >> What kind of code is *common* varies greatly from user to user. Not really - doing a multiply and checking whether the result is zero is exceedingly rare. I found only 3

Re: [PATCH][ARM] Add logical DImode expanders

2019-09-19 Thread Wilco Dijkstra
Hi Richard, > Please reformat this as one mapping per line.  Over time I expect this > is only going to grow. Sure, I've committed it reformatted as r275970. Wilco

Re: [PATCH] Fix PR91790

2019-09-19 Thread Bill Schmidt
On 9/19/19 1:34 PM, Segher Boessenkool wrote: Hi! On Tue, Sep 17, 2019 at 09:45:54AM +0200, Richard Biener wrote: The following fixes an old vectorizer issue with realignment support (thus only powerpc is affected) and BB vectorization. The realignment token is set up from the wrong

Re: [patch, testsuite, arm] Fix ICE in gcc.dg/gimplefe-28.c

2019-09-19 Thread Sandra Loosemore
On 9/19/19 2:40 AM, Kyrill Tkachov wrote: Index: gcc/testsuite/lib/target-supports.exp === --- gcc/testsuite/lib/target-supports.exp    (revision 275699) +++ gcc/testsuite/lib/target-supports.exp    (working copy) @@ -6670,6

Re: Monotonically increasing counter (was Re: [Contrib PATCH] Add scripts to convert GCC repo from SVN to Git)

2019-09-19 Thread Jason Merrill
On Wed, Aug 14, 2019 at 2:14 PM Jason Merrill wrote: > On Mon, Aug 5, 2019 at 2:22 PM Jason Merrill wrote: > > On 8/5/19 11:34 AM, Jakub Jelinek wrote: > > > On Mon, Aug 05, 2019 at 11:20:09AM -0400, Jason Merrill wrote: > > >> I agree. But for those who want a monotonically increasing > > >>

[C++ PATCH] Handle [[likely]] on compound-statement.

2019-09-19 Thread Jason Merrill
I overlooked this case when adding [[likely]] handling to cp_parser_statement. Tested x86_64-pc-linux-gnu, applying to trunk. * parser.c (cp_parser_statement): Handle [[likely]] on compound-statement. --- gcc/cp/parser.c | 5 -

C++ PATCH for c++/91819 - ICE with operator++ and enum.

2019-09-19 Thread Marek Polacek
This is an ICE that started with the recent r275745. The problem here is that for a POSTINCREMENT_EXPR build_new_op_1 is called with null arg2, so arg2_type is also null after 5819 tree arg2_type = arg2 ? unlowered_expr_type (arg2) : NULL_TREE; but then we make arg2 nonnull 5887 if (code

Re: [C++ PATCH 2/4] Fix conversions for built-in operator overloading candidates.

2019-09-19 Thread Jason Merrill
I've reverted this patch for the moment. On Wed, Sep 18, 2019 at 8:19 PM JiangNing OS wrote: > > Hi Jason, > > This commit caused boot-strap failure on aarch64. Is it a bug? Can this be > fixed ASAP? > > ../../gcc/gcc/expmed.c:5602:19: error: ���int_mode��� may be used > uninitialized in this

Re: Patch to support extended characters in C/C++ identifiers

2019-09-19 Thread Lewis Hyatt
On Thu, Sep 19, 2019 at 3:57 PM Joseph Myers wrote: > > On Thu, 12 Sep 2019, Lewis Hyatt wrote: > > > Attached is a single patch relative to current trunk that incorporates all > > of > > your feedback. I gzipped it like last time just in case the invalid UTF-8 in > > the tests presents a

[PATCH] Help compiler detect invalid code

2019-09-19 Thread François Dumont
Hi     I start working on making recently added constexpr tests to work in Debug mode.     It appears that the compiler is able to detect code mistakes pretty well as long we don't try to hide the code intention with a defensive approach. This is why I'd like to propose to replace '__n > 0'

Re: [C++ PATCH 2/4] Fix conversions for built-in operator overloading candidates.

2019-09-19 Thread Marek Polacek
On Thu, Sep 19, 2019 at 04:11:16PM -0400, Jason Merrill wrote: > Do any of you have a reproducer for this? I've attached it to 91825. Marek

Re: [PATCH] Fix PR91790

2019-09-19 Thread Segher Boessenkool
Hi! On Tue, Sep 17, 2019 at 09:45:54AM +0200, Richard Biener wrote: > The following fixes an old vectorizer issue with realignment support > (thus only powerpc is affected) and BB vectorization. The realignment > token is set up from the wrong data-ref which causes an SSA verification > failure

Re: Patch to support extended characters in C/C++ identifiers

2019-09-19 Thread Joseph Myers
On Thu, 12 Sep 2019, Lewis Hyatt wrote: > Attached is a single patch relative to current trunk that incorporates all of > your feedback. I gzipped it like last time just in case the invalid UTF-8 in > the tests presents a problem. The code changes are the same as before other > than comments. >

[Darwin, PPC, testsuite, committed] Fix pr89313.c fail.

2019-09-19 Thread Iain Sandoe
Hi, Darwin defines '__POWERPC__' rather than '__powerpc__' so check for the upper case version too in order to select the correct register name. tested on powerpc-darwin9, , applied to mainline. thanks Iain gcc/testsuite: 2019-09-19 Iain Sandoe * gcc.dg/pr89313.c: Test for

Re: [C++ PATCH 2/4] Fix conversions for built-in operator overloading candidates.

2019-09-19 Thread Jason Merrill
Do any of you have a reproducer for this? On Thu, Sep 19, 2019 at 3:43 PM Jason Merrill wrote: > > I've reverted this patch for the moment. > > On Wed, Sep 18, 2019 at 8:19 PM JiangNing OS > wrote: > > > > Hi Jason, > > > > This commit caused boot-strap failure on aarch64. Is it a bug? Can this

Re: [PATCH] Help compiler detect invalid code

2019-09-19 Thread François Dumont
I already realized that previous patch will be too controversial to be accepted. In this new version I just implement a real memmove in __memmove so that in copy_backward there is no need for a shortcut to a more defensive code. I'll see if in Debug mode I can do something. François On

Re: [PATCH] Speed up qsort in IPA ICF

2019-09-19 Thread Richard Biener
On Thu, Sep 19, 2019 at 3:02 PM Martin Liška wrote: > > On 9/19/19 1:01 PM, Richard Biener wrote: > > On Thu, Sep 19, 2019 at 11:06 AM Martin Liška wrote: > >> > >> Hi. > >> > >> As Alexander pointed out, the sort_congruence_class_groups_by_decl_uid is > >> the most > >> expensive qsort

[Ada] Streamline comparison for equality of 2-element arrays

2019-09-19 Thread Pierre-Marie de Rodat
In the general case, the comparison for equality of array objects is implemented by a local function that contains, among other things, a loop running over the elements, comparing them one by one and exiting as soon as an element is not the same in the two array objects. For the specific case of

[Ada] Suppress GNAT FE up-level reference transformation for GNAT-LLVM

2019-09-19 Thread Pierre-Marie de Rodat
In the case of GNAT-LLVM, the GNAT FE no longer does expansion of up-level references identified by the subprogram unnesting machinery into activation record references. This is now only done by the FE when generating C code. This expansion is already taken care of by the gnat-llvm middle phase,

[Ada] Implement Machine_Rounding attribute in line when possible

2019-09-19 Thread Pierre-Marie de Rodat
GNAT implements Machine_Rounding as an alias for Rounding but, whereas the implementation of the latter is in line when possible, that of the former is always out of line, which is not aligned with the intent of the Ada RM. This changes the compiler to using for Machine_Rounding the same in line

[Ada] Fix spurious type mismatch failure on nested instantiations

2019-09-19 Thread Pierre-Marie de Rodat
This fixes a spurious type mismatch failure reported between formal and actual of a call to a subprogram that comes from the instantiation of a child generic unit that itself contains an instantiation of a slibling child generic unit, when the parent is itself a generic unit with private part. The

[Ada] Fix fallout of previous change for bit-packed arrays

2019-09-19 Thread Pierre-Marie de Rodat
This fixes a regression introduced by the previous change that improved the handling of explicit by-reference mechanism. For the very specific case of a component of a bit-packed array, the front-end still needs to insert a copy around the call because this is where the rewriting into the sequence

[Ada] Allow constants of access type in Global contracts

2019-09-19 Thread Pierre-Marie de Rodat
Now that SPARK supports access types, global constants of access type may appear as outputs of a subprogram, with the meaning that the underlying memory can be modified (see SPARK RM 3.10). Tested on x86_64-pc-linux-gnu, committed on trunk 2019-09-19 Yannick Moy gcc/ada/ *

[Ada] Emit DW_AT_GNU_bias with -fgnat-encodings=gdb

2019-09-19 Thread Pierre-Marie de Rodat
Emit DW_AT_GNU_bias with -fgnat-encodings=gdb. gdb implements this, but not the encoded variant. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-09-19 Tom Tromey gcc/ada/ * gcc-interface/misc.c (gnat_get_type_bias): Return the bias when -fgnat-encodings=gdb.

[PATCH, Fortran] Optionally suppress no-automatic overwrites recursive warning - for review

2019-09-19 Thread Mark Eggleston
The following warning is produced when -fno-automatic and -frecursive are used at the same time: f951: Warning: Flag '-fno-automatic' overwrites '-frecursive' This is a reasonable warning, however, recursion can be used with the -fno-automatic flag where recursion is enabled using -frecusive

Re: [PATCH v2 4/6] compiler-gcc.h: add asm_inline definition

2019-09-19 Thread Segher Boessenkool
On Thu, Sep 12, 2019 at 02:54:50PM -0700, Nick Desaulniers wrote: > I have seen instances where instruction selection fails to select the > appropriate way to branch when inline asm size is misjudged, resulting > in un-encodeable jumps (as in the branch target is too far to be > encoded in the

Re: [10/32] Remove global call sets: combine.c

2019-09-19 Thread Segher Boessenkool
Hi Richard, Sorry this too me so long to get back to. On Thu, Sep 12, 2019 at 08:51:59AM +0100, Richard Sandiford wrote: > Segher Boessenkool writes: > > On Wed, Sep 11, 2019 at 08:08:38PM +0100, Richard Sandiford wrote: > >>hard_reg_set_iterator hrsi; > >> -

Re: [PATCH 0/4] True IPA reimplementation of IPA-SRA (v4)

2019-09-19 Thread Martin Jambor
Hello, this is what I have committed after Honza's approval and after re-testing on x86_64-linux and aarch64-linux. Thanks a lot for bearing with me, Martin 2019-09-20 Martin Jambor * coretypes.h (cgraph_edge): Declare. * ipa-param-manipulation.c: Rewrite. *