Re: C++ PATCH to remove WITH_CLEANUP_EXPR handling

2017-07-03 Thread Jason Merrill
Absolutely. On Mon, Jul 3, 2017 at 5:35 AM, Marek Polacek wrote: > On Thu, Jun 29, 2017 at 05:44:25PM -0400, Jason Merrill wrote: >> The C++ front end hasn't generated WITH_CLEANUP_EXPR in a very long >> time (20+ years?), so there's no need to handle it. > > Heh. Found another one; is this patc

Re: [PATCH] C/C++: add fix-it hints for various missing symbols

2017-07-03 Thread Joseph Myers
Does the changed location fix bug 7356? -- Joseph S. Myers jos...@codesourcery.com

[PATCH] Save and restore EDGE_DFS_BACK in draw_cfg_edges

2017-07-03 Thread Tom de Vries
[was: Re: [PATCH] Add dotfn ] On 07/03/2017 12:23 PM, Richard Biener wrote: Btw, I think this needs fixing: ... /* Draw all edges in the CFG. Retreating edges are drawin as not constraining, this makes the layout of the graph better. (??? Calling mark_dfs_back may change the compiler's

[PATCH] v2: c/c++: Add fix-it hints for suggested missing #includes

2017-07-03 Thread David Malcolm
On Fri, 2017-06-30 at 09:40 -0600, Jeff Law wrote: > On 05/26/2017 01:54 PM, David Malcolm wrote: > > Ping: > > https://gcc.gnu.org/ml/gcc-patches/2017-05/msg00321.html > > > > On Thu, 2017-05-04 at 12:36 -0400, David Malcolm wrote: > > > As of r247522, fix-it-hints can suggest the insertion of

[patch, libgfortran] Use memcpy in a few more places for eoshift

2017-07-03 Thread Thomas Koenig
Hello world, attached are a few more speedups for special eoshift cases. This time, nothing fancy, just use memcpy for copying in the contiguous case. I am still looking at eoshift2 (scalar shift, array boundary) to see if it would be possible to duplicate the speed gains for eoshift0 (scalar s

Re: fix libcc1 dependencies in toplevel Makefile

2017-07-03 Thread Olivier Hainque
Hi Alex, (Back from a few days away) > On 27 Jun 2017, at 21:50, Alexandre Oliva wrote: > >> I don't quite understand this: we're using the same prerequisite as target >> libraries, e.g. all-target-libstdc++-v3 or all-target-libbacktrace > > Not quite. Target libraries have deps on e.g. targe

Re: [C++ PATCH] "decomposition declaration" -> "structured binding" in C++ diagnostics

2017-07-03 Thread Jason Merrill
On Mon, Jul 3, 2017 at 3:59 PM, Jakub Jelinek wrote: > On Mon, Jul 03, 2017 at 03:50:06PM -0400, Jason Merrill wrote: >> On Mon, Jul 3, 2017 at 12:02 PM, Jakub Jelinek wrote: >> > So like this? >> >> Looks good, except... >> >> > case sc_auto: >> > - error_at (loc, "decomposition

Re: [PATCH v2][RFC] Canonize names of attributes.

2017-07-03 Thread Jason Merrill
On Mon, Jul 3, 2017 at 5:52 AM, Martin Liška wrote: > On 06/30/2017 09:34 PM, Jason Merrill wrote: >> On Fri, Jun 30, 2017 at 5:23 AM, Martin Liška wrote: >>> This is v2 of the patch, where just names of attributes are canonicalized. >>> Patch can bootstrap on ppc64le-redhat-linux and survives re

Re: [C++ PATCH] "decomposition declaration" -> "structured binding" in C++ diagnostics

2017-07-03 Thread Jakub Jelinek
On Mon, Jul 03, 2017 at 03:50:06PM -0400, Jason Merrill wrote: > On Mon, Jul 3, 2017 at 12:02 PM, Jakub Jelinek wrote: > > So like this? > > Looks good, except... > > > case sc_auto: > > - error_at (loc, "decomposition declaration cannot be declared " > > + error_at (loc,

Re: [C++ PATCH] "decomposition declaration" -> "structured binding" in C++ diagnostics

2017-07-03 Thread Jason Merrill
On Mon, Jul 3, 2017 at 12:02 PM, Jakub Jelinek wrote: > So like this? Looks good, except... > case sc_auto: > - error_at (loc, "decomposition declaration cannot be declared " > + error_at (loc, "structured binding declaration cannot be " > "C++98 %");

Re: [PATCH] C/C++: add fix-it hints for various missing symbols

2017-07-03 Thread David Malcolm
On Mon, 2017-07-03 at 19:57 +0100, Richard Sandiford wrote: > [Thanks for all your diagnostic work btw.] > > David Malcolm writes: > > clang can also print notes about matching opening symbols > > e.g. the note here: > > > > missing-symbol-2.c:25:22: error: expected ']' > > const char test

Re: [PATCH][PR 57371] Remove useless floating point casts in comparisons

2017-07-03 Thread Marc Glisse
On Mon, 3 Jul 2017, Jeff Law wrote: On 07/02/2017 11:03 AM, Yuri Gribov wrote: Hi all, This is initial patch for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57371 . Per Joseph's suggestion it optimizes (float)lhs CMP rhs (double)lhs CMP rhs to lhs CMP (typeof(x))rhs whenever typeof(x) c

Re: [PATCH] C/C++: add fix-it hints for various missing symbols

2017-07-03 Thread Richard Sandiford
[Thanks for all your diagnostic work btw.] David Malcolm writes: > clang can also print notes about matching opening symbols > e.g. the note here: > > missing-symbol-2.c:25:22: error: expected ']' > const char test [42; >^ > missing-symbol-2.c:25:19: note: to match

Re: [PATCH][PR 57371] Remove useless floating point casts in comparisons

2017-07-03 Thread Yuri Gribov
On Mon, Jul 3, 2017 at 4:28 PM, Jeff Law wrote: > On 07/03/2017 08:52 AM, Joseph Myers wrote: >> I'd expect much more thorough testcases here, both for cases that get >> optimized and cases that don't. You're only testing comparisons with >> zero. There should be comparisons with other values, b

Re: [PATCH][PR 57371] Remove useless floating point casts in comparisons

2017-07-03 Thread Yuri Gribov
On Mon, Jul 3, 2017 at 4:38 PM, Jeff Law wrote: > On 07/02/2017 11:03 AM, Yuri Gribov wrote: >> Hi all, >> >> This is initial patch for >> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57371 . Per Joseph's >> suggestion it optimizes >> (float)lhs CMP rhs >> (double)lhs CMP rhs >> to >> lhs CM

Re: RFC Kill TYPE_METHODS

2017-07-03 Thread Richard Biener
On July 3, 2017 7:49:32 PM GMT+02:00, Nathan Sidwell wrote: >We currently have both TYPE_FIELDS and TYPE_METHODS for RECORD or UNION > >types. > >Originally TYPE_FIELDS held the FIELD_DECLS, but the C++ FE puts other >kinds of things there -- TYPE_DECLs are a favourite. The C++ FE was >the >onl

Re: [PATCH v2] Add no_tail_call attribute

2017-07-03 Thread Yuri Gribov
On Mon, Jul 3, 2017 at 6:03 PM, Jeff Law wrote: > On 05/29/2017 11:24 PM, Yuri Gribov wrote: >> On Mon, May 29, 2017 at 8:14 AM, Yuri Gribov wrote: >>> Hi all, >>> >>> As discussed in >>> https://sourceware.org/ml/libc-alpha/2017-01/msg00455.html , some >>> libdl functions rely on return address

[PATCH] C/C++: add fix-it hints for various missing symbols

2017-07-03 Thread David Malcolm
This patch improves our C/C++ frontends' handling of missing symbols, by making c_parser_require and cp_parser_require use "better" locations for the diagnostic, and insert fix-it hints, under certain circumstances (see the comments in the patch for full details). For example, for this code with a

[committed] C++: fix "RT_INTERATION" typo

2017-07-03 Thread David Malcolm
r159808 (aka c247dce0f0ab6cbd1ac41cbca6b40b5d46a73f41) introduced the required_token enum to the C++ frontend, but contained a minor spelling mistake when expecting an iteration-statement, which this patch fixes. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Committed to trunk as

RFC Kill TYPE_METHODS

2017-07-03 Thread Nathan Sidwell
We currently have both TYPE_FIELDS and TYPE_METHODS for RECORD or UNION types. Originally TYPE_FIELDS held the FIELD_DECLS, but the C++ FE puts other kinds of things there -- TYPE_DECLs are a favourite. The C++ FE was the only user of TYPE_METHODS, which holds member functions. AFAICT it is

Re: [PATCH 1/3] c-family: add name_hint/deferred_diagnostic

2017-07-03 Thread David Malcolm
On Mon, 2017-07-03 at 10:25 -0600, Jeff Law wrote: > On 05/05/2017 11:51 AM, David Malcolm wrote: > > In various places we use lookup_name_fuzzy to provide a hint, > > and can report messages of the form: > > error: unknown foo named 'bar' > > or: > > error: unknown foo named 'bar'; did you mea

Re: Revamp loop profile scaling to profile_probability

2017-07-03 Thread Jan Hubicka
> On Sat, Jul 1, 2017 at 7:14 PM, Jan Hubicka wrote: > > Hi, > > this patch makes loop profile scaling to use profile_probability. This > > is mostly trivial change except for vect_do_peeling which seems to scale > > profile down and then back up. This is a bad idea, because things may > > simp

Re: [PATCH v2] Add no_tail_call attribute

2017-07-03 Thread Jeff Law
On 05/29/2017 11:24 PM, Yuri Gribov wrote: > On Mon, May 29, 2017 at 8:14 AM, Yuri Gribov wrote: >> Hi all, >> >> As discussed in >> https://sourceware.org/ml/libc-alpha/2017-01/msg00455.html , some >> libdl functions rely on return address to figure out the calling >> DSO and then use this inform

[C++ PATCH] classtype_has_nothrow_assign_or_copy_p is confusing

2017-07-03 Thread Nathan Sidwell
I found classtype_has_nothrow_assign_or_copy_p confusing, trying to figure out when it should return false and when true. AFAICT what it's trying to tell you is if *all* the copy/move ctors or copy assignment ops are nothrow. Not, as its comment suggests that it has *at least one* nothrow var

Re: [C++] Fix decomp ICE with invalid initializer (PR c++/81258)

2017-07-03 Thread Nathan Sidwell
On 07/03/2017 12:05 PM, Jakub Jelinek wrote: Ok. In the light of the http://gcc.gnu.org/ml/gcc-patches/2017-06/msg02432.html thread, shouldn't this be structured binding declaration then? I.e. Yes, I think that's better, thanks! nathan -- Nathan Sidwell

Re: [patch][arm/wwwdocs] Release note update for be8 changes

2017-07-03 Thread Richard Earnshaw (lists)
On 03/07/17 14:23, Richard Earnshaw (lists) wrote: > The existing code in arm/bpabi.h was quite fragile and relied on matching > specific CPU and/or architecture names. The introduction of the option > format for -mcpu and -march broke that in a way that would be non-trivial > to fix by updating t

Re: [patch][arm] Clean up generation of BE8 format images.

2017-07-03 Thread Richard Earnshaw (lists)
On 03/07/17 16:04, Joseph Myers wrote: > On Mon, 3 Jul 2017, Richard Earnshaw (lists) wrote: > >> * doc/invoke.texi (ARM Options): Document -mbe8 and -mbe32. > > Should also update the option summary inside @gccoptlist. > Good catch. Fixed as follows: * doc/invoke.texi (ARM Opti

Re: [PATCH 3/3] C: hints for missing stdlib includes for macros and types

2017-07-03 Thread Jeff Law
On 05/05/2017 11:51 AM, David Malcolm wrote: > The C frontend already "knows" about many common functions in > the C standard library: > > test.c: In function 'test': > test.c:3:3: warning: implicit declaration of function 'printf' > [-Wimplicit-function-declaration] > printf ("hello wor

Re: [PATCH 2/3] C++: provide macro used-before-defined hint (PR c++/72786).

2017-07-03 Thread Jeff Law
On 05/05/2017 11:51 AM, David Malcolm wrote: > This patch uses the name_hint/deferred_diagnostic to provide > a message in the C++ frontend if a macro is used before it is defined > e.g.: > > test.c:6:24: error: expected ‘;’ at end of member declaration >virtual void clone() const OVERRIDE { }

Re: [PATCH 1/3] c-family: add name_hint/deferred_diagnostic

2017-07-03 Thread Jeff Law
On 05/05/2017 11:51 AM, David Malcolm wrote: > In various places we use lookup_name_fuzzy to provide a hint, > and can report messages of the form: > error: unknown foo named 'bar' > or: > error: unknown foo named 'bar'; did you mean 'SUGGESTION? > > This patch provides a way for lookup_name_f

Re: [PATCH GCC8][33/33]Fix PR69710/PR68030 by reassociate vect base address and a simple CSE pass

2017-07-03 Thread Jeff Law
On 04/18/2017 04:54 AM, Bin Cheng wrote: > Hi, > This is the same patch posted at > https://gcc.gnu.org/ml/gcc-patches/2016-05/msg02000.html, > after rebase against this patch series. This patch was blocked because > without this patch > series, it could generate worse code on targets with limit

[Patch committed] Bug 81033 - [8 Regression] Revision r249019 breaks bootstrap on darwin

2017-07-03 Thread Dominique d'Humières
Patch --- ../_clean/gcc/config/darwin.c 2017-01-01 17:39:06.0 +0100 +++ gcc/config/darwin.c 2017-07-03 14:21:19.0 +0200 @@ -3683,11 +3683,9 @@ default_function_sections: void darwin_function_switched_text_sections (FILE *fp, tree decl, bool new_is_cold) { - char buf[128];

Re: [PATCH] diagnostics: fix end-points of ranges within macros (PR c++/79300)

2017-07-03 Thread Jeff Law
On 02/02/2017 01:53 PM, David Malcolm wrote: > PR c++/79300 identifies an issue in which diagnostics_show_locus > prints the wrong end-point for a range within a macro: > >assert ((p + val_size) - buf == encoded_len); >~^~~~ > > as opposed to: > >assert ((

Re: [C++] Fix decomp ICE with invalid initializer (PR c++/81258)

2017-07-03 Thread Jakub Jelinek
On Fri, Jun 30, 2017 at 01:38:13PM -0400, Nathan Sidwell wrote: > On 06/30/2017 01:24 PM, Jakub Jelinek wrote: > > > The initializer for structured binding has to be one of: > > = assignment-expression > > ( assignment-expression ) > > { assignment-expression } > > but cp_parser_initializer can pa

Re: [C++ PATCH] "decomposition declaration" -> "structured binding" in C++ diagnostics

2017-07-03 Thread Jakub Jelinek
Hi! On Fri, Jun 30, 2017 at 03:44:50PM -0400, Jason Merrill wrote: > Well, the term "structured binding" refers to one of the names > declared by the declaration, not the declaration as a whole, and those > errors refer to the latter. We could change "cannot be declared" to > something else, perh

Re: [PATCH][PR 57371] Remove useless floating point casts in comparisons

2017-07-03 Thread Jeff Law
On 07/02/2017 11:03 AM, Yuri Gribov wrote: > Hi all, > > This is initial patch for > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57371 . Per Joseph's > suggestion it optimizes > (float)lhs CMP rhs > (double)lhs CMP rhs > to > lhs CMP (typeof(x))rhs > whenever typeof(x) can be precisely repr

Re: [PATCH][testsuite] Add dg-require-stack-check

2017-07-03 Thread Jeff Law
On 07/03/2017 09:00 AM, Christophe Lyon wrote: > Hi, > > This is a follow-up to > https://gcc.gnu.org/ml/gcc-patches/2017-06/msg01791.html > > This patch adds dg-require-stack-check and updates the tests that use > dg-options "-fstack-check" to avoid failures on configurations that to > not suppo

Re: [PATCH][PR 57371] Remove useless floating point casts in comparisons

2017-07-03 Thread Jeff Law
On 07/03/2017 08:52 AM, Joseph Myers wrote: > I'd expect much more thorough testcases here, both for cases that get > optimized and cases that don't. You're only testing comparisons with > zero. There should be comparisons with other values, both integer and > noninteger, both within the range

Re: [PATCH][testsuite] Add dg-require-stack-check

2017-07-03 Thread Christophe Lyon
On 3 July 2017 at 17:12, Rainer Orth wrote: > Hi Christophe, > >> This is a follow-up to >> https://gcc.gnu.org/ml/gcc-patches/2017-06/msg01791.html >> >> This patch adds dg-require-stack-check and updates the tests that use >> dg-options "-fstack-check" to avoid failures on configurations that to

Re: [PATCH][testsuite] Add dg-require-stack-check

2017-07-03 Thread Rainer Orth
Hi Christophe, > This is a follow-up to > https://gcc.gnu.org/ml/gcc-patches/2017-06/msg01791.html > > This patch adds dg-require-stack-check and updates the tests that use > dg-options "-fstack-check" to avoid failures on configurations that to > not support it. > > I merely copied what we curren

[PATCH] hash table indentation

2017-07-03 Thread Nathan Sidwell
I noticed a mis-indented line. applied to trunk. nathan -- Nathan Sidwell 2017-07-03 Nathan Sidwell * hash-table.h (hash_table_mod1): Fix indentation. Index: hash-table.h === --- hash-table.h (revision 249922) +++ hash-table.h

Re: [patch][arm] Clean up generation of BE8 format images.

2017-07-03 Thread Joseph Myers
On Mon, 3 Jul 2017, Richard Earnshaw (lists) wrote: > * doc/invoke.texi (ARM Options): Document -mbe8 and -mbe32. Should also update the option summary inside @gccoptlist. -- Joseph S. Myers jos...@codesourcery.com

[PATCH][testsuite] Add dg-require-stack-check

2017-07-03 Thread Christophe Lyon
Hi, This is a follow-up to https://gcc.gnu.org/ml/gcc-patches/2017-06/msg01791.html This patch adds dg-require-stack-check and updates the tests that use dg-options "-fstack-check" to avoid failures on configurations that to not support it. I merely copied what we currently do to check if visibi

Re: [PATCH][PR 57371] Remove useless floating point casts in comparisons

2017-07-03 Thread Joseph Myers
I'd expect much more thorough testcases here, both for cases that get optimized and cases that don't. You're only testing comparisons with zero. There should be comparisons with other values, both integer and noninteger, both within the range for which optimizing would be valid and outside it

Fix ICE in update_br_prob_note

2017-07-03 Thread Jan Hubicka
Hi, this patch fixes two issues triggered by testcase in PR middle-end/81290. First is that jump threading has hack converting frequencies to counts and computing probabilities out of them. This gets wrong quality for these. Second is that force_edge_cold is bit overzelaous when propagate coldnes

Re: [Patch AArch64 docs] Document the RcPc extension

2017-07-03 Thread Richard Earnshaw (lists)
On 23/06/17 11:21, James Greenhalgh wrote: > > Hi, > > Andrew pointed out that I did not document the new architecture extension > flag I added the RcPc iextension. This was intentional, as enablihg the rcpc > extension does not change GCC code generation, and is just an assembler flag. > But for

Re: [PATCH, 2/4] Handle GOMP_OPENACC_NVPTX_{DISASM,SAVE_TEMPS} in libgomp nvptx plugin

2017-07-03 Thread Tom de Vries
On 07/03/2017 04:08 PM, Thomas Schwinge wrote: Hi! On Mon, 26 Jun 2017 17:29:11 +0200, Jakub Jelinek wrote: On Mon, Jun 26, 2017 at 03:26:57PM +, Joseph Myers wrote: On Mon, 26 Jun 2017, Tom de Vries wrote: 2. Handle GOMP_OPENACC_NVPTX_{DISASM,SAVE_TEMPS} in libgomp nvptx plugin This

Re: [C++ PATCH] conversion operator names

2017-07-03 Thread Nathan Sidwell
On 07/01/2017 05:40 PM, Andreas Schwab wrote: On Jun 30 2017, Nathan Sidwell wrote: * config-lang.in (gtfiles): Add cp/lex.c. That breaks obj-c++. sorry about that. Turns out I was only building objc not objc++, so I didn't notice that. While objcp's config-lang.in claimed the

Re: [PATCH, 2/4] Handle GOMP_OPENACC_NVPTX_{DISASM,SAVE_TEMPS} in libgomp nvptx plugin

2017-07-03 Thread Jakub Jelinek
On Mon, Jul 03, 2017 at 04:08:10PM +0200, Thomas Schwinge wrote: > > And IMNSHO GOMP_DEBUG too. > > But why that? Isn't GOMP_DEBUG just controlling terminal debugging > output (that you'd also like to see in setuid/setgid programs)? The output could go into stderr, which could very well be redir

Re: [PATCH GCC][3/4]Generalize dead store elimination (or store motion) across loop iterations in predcom

2017-07-03 Thread Bin.Cheng
On Mon, Jul 3, 2017 at 10:38 AM, Richard Biener wrote: > On Tue, Jun 27, 2017 at 12:49 PM, Bin Cheng wrote: >> Hi, >> For the moment, tree-predcom.c only supports >> invariant/load-loads/store-loads chains. >> This patch generalizes dead store elimination (or store motion) across loop >> iterat

Re: [C++ PATCH] conversion operator names

2017-07-03 Thread Nathan Sidwell
On 06/30/2017 04:24 PM, Jason Merrill wrote: Suspense! :) Only because I wanted to go home :) I was abusing identifiers during the streaming process, and had to clean them up anyway. At that point it's a simple question of: if (IDENTIFIER_CONV_OP_P (t)) { write (tag_conv_op), write

Re: [PATCH, 2/4] Handle GOMP_OPENACC_NVPTX_{DISASM,SAVE_TEMPS} in libgomp nvptx plugin

2017-07-03 Thread Thomas Schwinge
Hi! On Mon, 26 Jun 2017 17:29:11 +0200, Jakub Jelinek wrote: > On Mon, Jun 26, 2017 at 03:26:57PM +, Joseph Myers wrote: > > On Mon, 26 Jun 2017, Tom de Vries wrote: > > > > > > 2. Handle GOMP_OPENACC_NVPTX_{DISASM,SAVE_TEMPS} in libgomp nvptx plugin > > > > > > This patch adds handling of:

Re: MAINTAINERS update

2017-07-03 Thread Bernd Schmidt
On 06/11/2017 08:03 PM, Gerald Pfeifer wrote: > On Tue, 30 May 2017, Bernd Schmidt wrote: >> On 05/30/2017 09:05 AM, Richard Biener wrote: >>> This leaves the nvptx and c6x ports without a maintainer. Do >>> you have any recommendations for a successor here? >> Not really. It would be a shame to

[PATCH][OBVIOUS] Fix a test-case by adding dg-require.

2017-07-03 Thread Martin Liška
Hi. I'm going to install following obvious test that adds missing gd-require. Martin gcc/testsuite/ChangeLog: 2017-07-03 Martin Liska * gcc.target/i386/mvc6.c: Add requirement for ifunc. --- gcc/testsuite/gcc.target/i386/mvc6.c | 1 + 1 file changed, 1 insertion(+) diff --git a/g

Re: [PATCH] Fix removal of ifunc (PR ipa/81214).

2017-07-03 Thread Rainer Orth
Hi Martin, > Following patch fixes the issue where we do not emit ifunc and resolver > for function that are not called in a compilation unit or and not > referenced. > > Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. > i386.exp tests work on x86_64-linux-gnu. your pat

[PATCH][2/2] PR60510, reduction chain vectorization w/o SLP

2017-07-03 Thread Richard Biener
The following is the patch enabling non-SLP vectorization of failed SLP reduction chains. It simply dissolves the group composing the SLP reduction chain when vect_analyze_slp fails to detect the SLP and then fixes up the remaining pieces in reduction vectorization. I've made sure that SPEC CPU

Re: [PATCH] Use secure_getenv for GOMP_DEBUG

2017-07-03 Thread Tom de Vries
On 07/03/2017 02:26 PM, Franz Sirl wrote: Am 27.06.17 um 13:10 schrieb Tom de Vries: --- a/libgomp/plugin/plugin-hsa.c +++ b/libgomp/plugin/plugin-hsa.c @@ -39,32 +39,7 @@ #include #include "libgomp-plugin.h" #include "gomp-constants.h" - -/* Secure getenv() which returns NULL if running

[patch][arm] Clean up generation of BE8 format images.

2017-07-03 Thread Richard Earnshaw (lists)
The existing code in arm/bpabi.h was quite fragile and relied on matching specific CPU and/or architecture names. The introduction of the option format for -mcpu and -march broke that in a way that would be non-trivial to fix by updating the list. The hook in that file was always a pain as it req

Re: [PATCH 2/3] Simplify wrapped binops

2017-07-03 Thread Richard Biener
On Wed, Jun 28, 2017 at 4:34 PM, Robin Dapp wrote >> ideally you'd use a wide-int here and defer the tree allocation to the result > > Did that in the attached version. > >> So I guess we never run into the outer_op == minus case as the above is >> clearly wrong for that? > > Right, damn, not only

Re: [RFC PATCH] Fix pointer diff (was: -fsanitize=pointer-overflow support (PR sanitizer/80998))

2017-07-03 Thread Richard Biener
On Sat, 1 Jul 2017, Marc Glisse wrote: > On Thu, 22 Jun 2017, Richard Biener wrote: > > > On Thu, 22 Jun 2017, Marc Glisse wrote: > > > > > On Thu, 22 Jun 2017, Richard Biener wrote: > > > > > > > > If we consider pointers as unsigned, with a subtraction that has a > > > > > signed > > > > > re

Re: [PATCH] Use secure_getenv for GOMP_DEBUG

2017-07-03 Thread Franz Sirl
Am 27.06.17 um 13:10 schrieb Tom de Vries: --- a/libgomp/plugin/plugin-hsa.c +++ b/libgomp/plugin/plugin-hsa.c @@ -39,32 +39,7 @@ #include #include "libgomp-plugin.h" #include "gomp-constants.h" - -/* Secure getenv() which returns NULL if running as SUID/SGID. */ -#ifndef HAVE_SECURE_GETE

Fix profile updating on loop-doloop

2017-07-03 Thread Jan Hubicka
Hi, this patch fixes powerPC bootstrap ICE caused by doloop incorrectly updating profile. Comitted. PR bootstrap/81285 * loop-doloop.c (add_test): Update profile. Index: loop-doloop.c === --- loop-doloop.c (rev

Re: [PATCH GCC][13/13]Distribute loop with loop versioning under runtime alias check

2017-07-03 Thread Richard Biener
On Fri, Jun 30, 2017 at 12:43 PM, Bin.Cheng wrote: > On Wed, Jun 28, 2017 at 2:09 PM, Bin.Cheng wrote: >> On Wed, Jun 28, 2017 at 1:29 PM, Richard Biener >> wrote: >>> On Wed, Jun 28, 2017 at 1:46 PM, Bin.Cheng wrote: On Wed, Jun 28, 2017 at 11:58 AM, Richard Biener wrote: > On T

Re: [PATCH GCC][01/13]Introduce internal function IFN_LOOP_DIST_ALIAS

2017-07-03 Thread Richard Biener
On Fri, Jun 30, 2017 at 12:37 PM, Bin.Cheng wrote: > On Wed, Jun 28, 2017 at 8:29 AM, Richard Biener > wrote: >> On Tue, Jun 27, 2017 at 6:46 PM, Bin.Cheng wrote: >>> On Tue, Jun 27, 2017 at 3:59 PM, Richard Biener >>> wrote: On June 27, 2017 4:27:17 PM GMT+02:00, "Bin.Cheng" wrote:

Re: [Patch AArch64] Stop generating BSL for simple integer code

2017-07-03 Thread James Greenhalgh
On Wed, Jun 21, 2017 at 11:49:07AM +0100, James Greenhalgh wrote: > *ping* *ping*x2 Thanks, James > On Mon, Jun 12, 2017 at 02:44:40PM +0100, James Greenhalgh wrote: > > [Sorry for the re-send. I spotted that the attributes were not right for the > > new pattern I was adding. The change between

Re: [PATCH][AArch64][GCC 6] PR target/79041: Correct -mpc-relative-literal-loads logic in aarch64_classify_symbol

2017-07-03 Thread Yvan Roux
On 27 June 2017 at 13:14, Yvan Roux wrote: > Hi Wilco > > On 27 June 2017 at 12:53, Wilco Dijkstra wrote: >> Hi Yvan, >> >>> Here is the backport of Wilco's patch (r237607) along with Kyrill's >>> one (r244643, which removed the remaining occurences of >>> aarch64_nopcrelative_literal_loads). To

Re: [Patch AArch64 2/2] Fix memory sizes to load/store patterns

2017-07-03 Thread James Greenhalgh
On Wed, Jun 21, 2017 at 11:50:08AM +0100, James Greenhalgh wrote: > *ping* *ping*x2 Thanks, James > On Mon, Jun 12, 2017 at 02:54:00PM +0100, James Greenhalgh wrote: > > > > Hi, > > > > There seems to be a partial misconception in the AArch64 backend that > > load1/load2 referred to the number

Re: [Patch AArch64 2/2] Fix memory sizes to load/store patterns

2017-07-03 Thread James Greenhalgh
On Wed, Jun 21, 2017 at 11:50:08AM +0100, James Greenhalgh wrote: > *ping* Ping*2 Thanks, James > On Mon, Jun 12, 2017 at 02:54:00PM +0100, James Greenhalgh wrote: > > > > Hi, > > > > There seems to be a partial misconception in the AArch64 backend that > > load1/load2 referred to the number o

Re: [6/7] Add a helper for getting the overall alignment of a DR

2017-07-03 Thread Richard Biener
On Mon, Jul 3, 2017 at 9:40 AM, Richard Sandiford wrote: > This combines the information from previous patches to give a guaranteed > alignment for the DR as a whole. This should be a bit safer than using > base_element_aligned, since that only really took the base into account > (not the init or

Re: [Patch AArch64 docs] Document the RcPc extension

2017-07-03 Thread James Greenhalgh
On Fri, Jun 23, 2017 at 11:21:43AM +0100, James Greenhalgh wrote: > > Hi, > > Andrew pointed out that I did not document the new architecture extension > flag I added the RcPc iextension. This was intentional, as enablihg the rcpc > extension does not change GCC code generation, and is just an as

Re: [5/7] Add DR_BASE_ALIGNMENT and DR_BASE_MISALIGNMENT

2017-07-03 Thread Richard Biener
On Mon, Jul 3, 2017 at 9:38 AM, Richard Sandiford wrote: > This patch records the base alignment and misalignment in > innermost_loop_behavior, to avoid the second-guessing that was > previously done in vect_compute_data_ref_alignment. It also makes > vect_analyze_data_refs use dr_analyze_innermo

Do not merge blocks when profile would be lost

2017-07-03 Thread Jan Hubicka
Hi, consider function test () { do_something_that_will_call_exit (); report_catastrophic_failure (); } No while profile estimation we know that do_something_that_will_call_exit may end execution and thus split BBs and introduce fake edges. After fake edges are removed we however merge BBs an

Re: [PATCH] Add dotfn

2017-07-03 Thread Richard Biener
On Mon, 3 Jul 2017, Tom de Vries wrote: > On 07/03/2017 11:53 AM, Richard Biener wrote: > > On Mon, 3 Jul 2017, Tom de Vries wrote: > > > > > On 07/03/2017 09:05 AM, Richard Biener wrote: > > > > On Mon, 3 Jul 2017, Tom de Vries wrote: > > > > > > > > > Hi, > > > > > > > > > > this patch adds a

Re: [PATCH] Add dotfn

2017-07-03 Thread Tom de Vries
On 07/03/2017 11:53 AM, Richard Biener wrote: On Mon, 3 Jul 2017, Tom de Vries wrote: On 07/03/2017 09:05 AM, Richard Biener wrote: On Mon, 3 Jul 2017, Tom de Vries wrote: Hi, this patch adds a debug function dotfn and a convenience macro DOTFN similar to dot-fn in gdbhooks.py. It can be u

Re: [4/7] Add DR_STEP_ALIGNMENT

2017-07-03 Thread Richard Biener
On Mon, Jul 3, 2017 at 9:35 AM, Richard Sandiford wrote: > A later patch adds base alignment information to innermost_loop_behavior. > After that, the only remaining piece of alignment information that wasn't > immediately obvious was the step alignment. Adding that allows a minor > simplificatio

Re: [PATCH] Add dotfn

2017-07-03 Thread Richard Biener
On Mon, 3 Jul 2017, Tom de Vries wrote: > On 07/03/2017 09:05 AM, Richard Biener wrote: > > On Mon, 3 Jul 2017, Tom de Vries wrote: > > > > > Hi, > > > > > > this patch adds a debug function dotfn and a convenience macro DOTFN > > > similar > > > to dot-fn in gdbhooks.py. > > > > > > It can be

Re: [PATCH v2][RFC] Canonize names of attributes.

2017-07-03 Thread Martin Liška
On 06/30/2017 09:34 PM, Jason Merrill wrote: > On Fri, Jun 30, 2017 at 5:23 AM, Martin Liška wrote: >> This is v2 of the patch, where just names of attributes are canonicalized. >> Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. > > What is the purpose of the new "stric

Re: [3/7] Rename DR_ALIGNED_TO to DR_OFFSET_ALIGNMENT

2017-07-03 Thread Richard Biener
On Mon, Jul 3, 2017 at 9:32 AM, Richard Sandiford wrote: > This patch renames DR_ALIGNED_TO to DR_OFFSET_ALIGNMENT, to avoid > confusion with the upcoming DR_BASE_ALIGNMENT. Nothing needed the > value as a tree, and the value is clipped to BIGGEST_ALIGNMENT > (maybe it should be MAX_OFILE_ALIGNME

Re: [2/7] Make dr_analyze_innermost operate on innermost_loop_behavior

2017-07-03 Thread Richard Biener
On Mon, Jul 3, 2017 at 9:30 AM, Richard Sandiford wrote: > This means that callers to dr_analyze_innermost don't need a full > data_reference and don't need to fill in any fields beforehand. > > Tested on aarch64-linux-gnu and x86_64-linux-gnu. OK to install? Ok. Thanks, Richard. > Richard > >

Re: [1/7] Use innermost_loop_behavior for outer loop vectorisation

2017-07-03 Thread Richard Biener
On Mon, Jul 3, 2017 at 9:28 AM, Richard Sandiford wrote: > This patch replaces the individual stmt_vinfo dr_* fields with > an innermost_loop_behavior, so that the changes in later patches > get picked up automatically. It also adds a helper function for > getting the behavior of a data reference

Re: [PATCH GCC][3/4]Generalize dead store elimination (or store motion) across loop iterations in predcom

2017-07-03 Thread Richard Biener
On Tue, Jun 27, 2017 at 12:49 PM, Bin Cheng wrote: > Hi, > For the moment, tree-predcom.c only supports invariant/load-loads/store-loads > chains. > This patch generalizes dead store elimination (or store motion) across loop > iterations in > predictive commoning pass by supporting store-store c

Re: C++ PATCH to remove WITH_CLEANUP_EXPR handling

2017-07-03 Thread Marek Polacek
On Thu, Jun 29, 2017 at 05:44:25PM -0400, Jason Merrill wrote: > The C++ front end hasn't generated WITH_CLEANUP_EXPR in a very long > time (20+ years?), so there's no need to handle it. Heh. Found another one; is this patch ok if it passes testing? 2017-07-03 Marek Polacek * c-warn.

Re: [PATCH] Add dotfn

2017-07-03 Thread Tom de Vries
On 07/03/2017 09:05 AM, Richard Biener wrote: On Mon, 3 Jul 2017, Tom de Vries wrote: Hi, this patch adds a debug function dotfn and a convenience macro DOTFN similar to dot-fn in gdbhooks.py. It can be used to have the compiler: - dump a control flow graph, or - pop up a control flow graph w

Re: [gomp4] fix an ICE involving assumed-size arrays

2017-07-03 Thread Thomas Schwinge
Hi! On Tue, 30 Aug 2016 14:55:06 -0700, Cesar Philippidis wrote: > Usually a data clause would would have OMP_CLAUSE_SIZE set, but not all > do. In the latter case, lower_omp_target falls back to using size of the > type of the variable specified in the data clause. However, in the case > of ass

Re: [Libgomp, Fortran] Fix canadian cross build

2017-07-03 Thread Yvan Roux
On 23 June 2017 at 15:44, Yvan Roux wrote: > Hello, > > Fortran parts of libgomp (omp_lib.mod, openacc.mod, etc...) are > missing in a canadian cross build, at least when target gfortran > compiler comes from PATH and not from GFORTRAN_FOR_TARGET. > > Back in 2010, executability test of GFORTRAN w

RFC/A: Early predictive commoning pass

2017-07-03 Thread Richard Sandiford
General predictive commoning would play havoc with loop vectorisation, so the current pass order is clearly the right one. But running a very limited form of predictive commoning before vectorisation would allow us to vectorise things like: for (int i = 1; i < n; ++i) x[i] = x[i - 1]

Re: [PATCH PR78005]Fix miscompare issue by computing correct guard condition for vectorized loop

2017-07-03 Thread Richard Biener
On Mon, 3 Jul 2017, Richard Sandiford wrote: > Richard Biener writes: > > On Mon, 12 Jun 2017, Bin.Cheng wrote: > >> On Mon, Jun 12, 2017 at 9:19 AM, Richard Sandiford > >> wrote: > >> > "Bin.Cheng" writes: > >> >> On Sat, Jun 10, 2017 at 10:40 AM, Richard Sandiford > >> >> wrote: > >> >>> Sor

Re: Revamp loop profile scaling to profile_probability

2017-07-03 Thread Richard Biener
On Sat, Jul 1, 2017 at 7:14 PM, Jan Hubicka wrote: > Hi, > this patch makes loop profile scaling to use profile_probability. This > is mostly trivial change except for vect_do_peeling which seems to scale > profile down and then back up. This is a bad idea, because things may simply > drop to 0.

Re: [PATCH PR78005]Fix miscompare issue by computing correct guard condition for vectorized loop

2017-07-03 Thread Richard Sandiford
Richard Biener writes: > On Mon, 12 Jun 2017, Bin.Cheng wrote: >> On Mon, Jun 12, 2017 at 9:19 AM, Richard Sandiford >> wrote: >> > "Bin.Cheng" writes: >> >> On Sat, Jun 10, 2017 at 10:40 AM, Richard Sandiford >> >> wrote: >> >>> Sorry to return this old patch, but: >> >>> >> >>> Bin Cheng wri

[7/7] Pool alignment information for common bases

2017-07-03 Thread Richard Sandiford
This patch is a follow-on to the fix for PR81136. The testcase for that PR shows that we can (correctly) calculate different base alignments for two data_references but still tell that their misalignments wrt the vector size are equal. This is because we calculate the base alignments for each dr

PING: Fwd: SSA range class and removal of VR_ANTI_RANGEs

2017-07-03 Thread Aldy Hernandez
-- Forwarded message -- From: Aldy Hernandez Date: Wed, Jun 21, 2017 at 3:01 AM Subject: Re: SSA range class and removal of VR_ANTI_RANGEs To: Jakub Jelinek Cc: Richard Biener , Andrew MacLeod , richard.sandif...@linaro.org, gcc-patches , Martin Sebor Hi folks. The following i

[6/7] Add a helper for getting the overall alignment of a DR

2017-07-03 Thread Richard Sandiford
This combines the information from previous patches to give a guaranteed alignment for the DR as a whole. This should be a bit safer than using base_element_aligned, since that only really took the base into account (not the init or offset). Tested on aarch64-linux-gnu and x86_64-linux-gnu. OK t

[5/7] Add DR_BASE_ALIGNMENT and DR_BASE_MISALIGNMENT

2017-07-03 Thread Richard Sandiford
This patch records the base alignment and misalignment in innermost_loop_behavior, to avoid the second-guessing that was previously done in vect_compute_data_ref_alignment. It also makes vect_analyze_data_refs use dr_analyze_innermost, instead of having an almost-copy of the same code. I wasn't s

[4/7] Add DR_STEP_ALIGNMENT

2017-07-03 Thread Richard Sandiford
A later patch adds base alignment information to innermost_loop_behavior. After that, the only remaining piece of alignment information that wasn't immediately obvious was the step alignment. Adding that allows a minor simplification to vect_compute_data_ref_alignment, and also potentially improve

[3/7] Rename DR_ALIGNED_TO to DR_OFFSET_ALIGNMENT

2017-07-03 Thread Richard Sandiford
This patch renames DR_ALIGNED_TO to DR_OFFSET_ALIGNMENT, to avoid confusion with the upcoming DR_BASE_ALIGNMENT. Nothing needed the value as a tree, and the value is clipped to BIGGEST_ALIGNMENT (maybe it should be MAX_OFILE_ALIGNMENT?) so we might as well use an unsigned int instead. Tested on a

[1/7] Use innermost_loop_behavior for outer loop vectorisation

2017-07-03 Thread Richard Sandiford
This patch replaces the individual stmt_vinfo dr_* fields with an innermost_loop_behavior, so that the changes in later patches get picked up automatically. It also adds a helper function for getting the behavior of a data reference wrt the vectorised loop. Tested on aarch64-linux-gnu and x86_64-

[2/7] Make dr_analyze_innermost operate on innermost_loop_behavior

2017-07-03 Thread Richard Sandiford
This means that callers to dr_analyze_innermost don't need a full data_reference and don't need to fill in any fields beforehand. Tested on aarch64-linux-gnu and x86_64-linux-gnu. OK to install? Richard 2017-07-03 Richard Sandiford gcc/ * tree-data-ref.h (dr_analyze_innermost): Rep

Re: [PATCH] Fix PR81249

2017-07-03 Thread Richard Biener
On Fri, 30 Jun 2017, Christophe Lyon wrote: > Hi Richard, > > > On 29 June 2017 at 14:53, Richard Biener wrote: > > > > Bootstrap and regtest running on x86_64-unknown-linux-gnu. > > > > Richard. > > > > 2017-06-29 Richard Biener > > > > PR tree-optimization/81249 > > * tree-

[PATCH][1/2] PR60510, reduction chain vectorization w/o SLP

2017-07-03 Thread Richard Biener
This is the 1st patch in the series to support reduction chain vectorization without SLP. In the PR there's a reduction chain detected that doesn't qualify SLP but then this completely fails vectorization because we cannot do regular reduction vectorization on this. This patch series aims at fi

Re: [PATCH] Add dotfn

2017-07-03 Thread Richard Biener
On Mon, 3 Jul 2017, Tom de Vries wrote: > Hi, > > this patch adds a debug function dotfn and a convenience macro DOTFN similar > to dot-fn in gdbhooks.py. > > It can be used to have the compiler: > - dump a control flow graph, or > - pop up a control flow graph window > at specific moments in th

  1   2   >