Re: [PATCH] Delete files unused since openbsd 2 & 3 support was dropped.

2017-07-24 Thread Jeff Law
On 07/24/2017 08:29 PM, Jim Wilson wrote: > Trevor Saunders deleted the x86 openbsd 2 & 3 support here. > https://gcc.gnu.org/ml/gcc-patches/2016-06/msg01368.html > With that change, there are now 3 unused files that he missed. I noticed > the gstabs.h file while looking at debugging info rela

Re: [PATCH] Fix wrong condition in ipa-visibility.c (PR ipa/81520).

2017-07-24 Thread Yuri Gribov
On Mon, Jul 24, 2017 at 1:52 PM, Martin Liška wrote: > Hi. > > The patch fixed PR mentioned in subject of this email. We should not call the > transformation > on targets that do not support aliases. > > Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. > Apart from that,

[PING] [PATCH] enhance -Wrestrict to handle string built-ins (PR 78918)

2017-07-24 Thread Martin Sebor
Ping: https://gcc.gnu.org/ml/gcc-patches/2017-07/msg01264.html This change is related to [PATCH] enhance -Wrestrict for sprintf %s arguments https://gcc.gnu.org/ml/gcc-patches/2017-07/msg01176.html On 07/20/2017 02:45 PM, Martin Sebor wrote: With more testing (building GDB, Glibc, Busyb

Re: [PATCH] enhance -Wrestrict for sprintf %s arguments

2017-07-24 Thread Martin Sebor
Ping: Jeff, please see my reply below. On 07/19/2017 10:10 AM, Martin Sebor wrote: On 07/19/2017 12:42 AM, Jeff Law wrote: On 07/02/2017 02:00 PM, Martin Sebor wrote: The attached patch enhances the -Wrestrict warning to detect more than just trivial instances of overlapping copying by sprintf

[PING #2] [PATCH] enhance overflow and truncation detection in strncpy and strncat (PR 81117)

2017-07-24 Thread Martin Sebor
Ping #2: https://gcc.gnu.org/ml/gcc-patches/2017-07/msg00411.html On 07/08/2017 02:45 PM, Martin Sebor wrote: PR 81117 asks for improved detection of common misuses(*) of strncpy and strncat. The attached patch is my solution. It consists of three related sets of changes: 1) Adds a new opt

Re: [PATCH] prevent -Wall from resetting -Wstringop-overflow=2 to 1 (pr 81345)

2017-07-24 Thread Martin Sebor
On 07/17/2017 01:17 PM, Martin Sebor wrote: On 07/10/2017 05:27 PM, Joseph Myers wrote: On Mon, 10 Jul 2017, Martin Sebor wrote: On 07/07/2017 10:58 AM, Joseph Myers wrote: This patch is OK. Thanks. Committed in r250104. Do you have any comments on or concerns with changing how LangEnabl

[PATCH] Delete files unused since openbsd 2 & 3 support was dropped.

2017-07-24 Thread Jim Wilson
Trevor Saunders deleted the x86 openbsd 2 & 3 support here. https://gcc.gnu.org/ml/gcc-patches/2016-06/msg01368.html With that change, there are now 3 unused files that he missed. I noticed the gstabs.h file while looking at debugging info related files, and then did a consistency check and no

[PATCH #2, cleanup] Remove PowerPC TARGET_UPPER_REGS_{DF,SF} macros

2017-07-24 Thread Michael Meissner
This patch eliminates the TARGET_UPPER_REGS_{DF,SF} macros. The next patch will eliminate TARGET_UPPER_REGS_DI. I had to tune the optimization that turned load into FPR register and then move to Altivec register (and the store equivalent) because it used TARGET_UPPER_REGS_ to protect SFmode on po

Re: Add -Wsuggest-attribute=cold

2017-07-24 Thread Martin Sebor
+extern void do_something_interesting_and_never_return (); + +int +foo1(int a) +{ /* { dg-warning "cold" "detect cold candidate" { target *-*-* } "8" } */ + if (a) +abort (); + else +abort (); +} In this case it looks to me like with the patch GCC will actually issue two suggestions: t

Re: [PATCH] Do not silently continue if config.{build,host,gcc} fails

2017-07-24 Thread Jeff Law
On 07/24/2017 01:03 AM, Segher Boessenkool wrote: > Ping? > > > Segher > > > On Mon, May 15, 2017 at 04:29:24PM +, Segher Boessenkool wrote: >> If config.{build,host,gcc} fails, configure currently silently >> continues. This then makes it much harder than necessary to notice >> you made a

Re: [PATCH 6/7] [ARC] Reimplement ZOL support.

2017-07-24 Thread Sandra Loosemore
On 07/24/2017 02:42 AM, Claudiu Zissulescu wrote: +@item -mlpc-width=@var{lpcw} +@opindex mlpc-width +Specify the width of the LP_COUNT register. Valid values for +@var{lpcw} are 8, 16, 20, 24, 28 and 32. The default width is fixed +to 32. If the width is less than 32, the compiler does not a

Re: Add -Wsuggest-attribute=cold

2017-07-24 Thread Jeff Law
On 07/24/2017 04:06 PM, Jan Hubicka wrote: >> On 07/24/2017 01:08 PM, Jan Hubicka wrote: On Mon, Jul 24, 2017 at 2:56 PM, Jan Hubicka wrote: > Hi, > this patch adds -Wsuggest-attribute=cold because we can now statically > detect > cold functions atuomatically. > > Boo

Re: [PATCH] Kill TYPE_METHODS debug 1/9

2017-07-24 Thread Jeff Law
On 07/20/2017 04:03 PM, Jim Wilson wrote: > On Thu, Jul 20, 2017 at 2:00 PM, Nathan Sidwell wrote: >> With this patch the gdb stabs test results are still awful, but they are >> unchanged awfulness. > > Yes, the stabs support for C++ is poor. That is one of the reasons > why almost everyone has

Re: [PATCH] Optimize BB sorting in domwalk

2017-07-24 Thread Jeff Law
On 07/24/2017 05:29 AM, Alexander Monakov wrote: > Profiling uses of qsort in GCC reveals that a significant portion of calls > comes from domwalk.c where child nodes in dominator tree are reordered > according to postorder numbering. However we know that in dominator trees > the vast majority of

Re: [PATCH 1/2] simplify-rtx: The truncation of an IOR can have all bits set (PR81423)

2017-07-24 Thread Jeff Law
On 07/24/2017 02:50 AM, Segher Boessenkool wrote: > On Wed, Jul 19, 2017 at 12:19:32AM -0600, Jeff Law wrote: >> On 07/18/2017 01:36 PM, Segher Boessenkool wrote: >>> * simplify-rtx.c (simplify_truncation): Handle truncating an IOR >>> with a constant that is -1 in the truncated to mode. >>

Re: Add -Wsuggest-attribute=cold

2017-07-24 Thread Jan Hubicka
> On 07/24/2017 01:08 PM, Jan Hubicka wrote: > >> On Mon, Jul 24, 2017 at 2:56 PM, Jan Hubicka wrote: > >>> Hi, > >>> this patch adds -Wsuggest-attribute=cold because we can now statically > >>> detect > >>> cold functions atuomatically. > >>> > >>> Bootstrapped/regtested x86_64-linux. Plan to co

Re: Add -Wsuggest-attribute=cold

2017-07-24 Thread Jeff Law
On 07/24/2017 01:08 PM, Jan Hubicka wrote: >> On Mon, Jul 24, 2017 at 2:56 PM, Jan Hubicka wrote: >>> Hi, >>> this patch adds -Wsuggest-attribute=cold because we can now statically >>> detect >>> cold functions atuomatically. >>> >>> Bootstrapped/regtested x86_64-linux. Plan to commit it tomorrow

Re: [PATCH][RFA/RFC] Stack clash mitigation patch 07/08 V2

2017-07-24 Thread Jeff Law
On 07/21/2017 12:17 PM, Wilco Dijkstra wrote: > Jeff Law wrote: > >> Examples please? We should be probing the outgoing args at the probe >> interval once the total static frame is greater than 3k. The dynamic >> space should be probed by generic code. > > OK, here are a few simple example

[patch, fortran] Fix PR 79312, find invalid typespec for empty array constructors

2017-07-24 Thread Thomas Koenig
Hello world, the attached patch fixes the PR; patch and test case are rather self-explanatory. Regression-testing as I write this. OK for trunk if it passes? Regards Thomas 2017-07-24 Thomas König PR fortran/79312 * intrisic.c (gfc_convert_type_warn): Only set ty

Re: [PATCH, rs6000] Add testcases for vec_cnttz

2017-07-24 Thread Carl Love
On Fri, 2017-07-14 at 15:58 -0500, Segher Boessenkool wrote: > Hi Carl, > > On Fri, Jul 14, 2017 at 01:20:32PM -0700, Carl Love wrote: > > --- /dev/null > > +++ b/gcc/testsuite/gcc.target/powerpc/builtins-4-p9-runnable.c > > @@ -0,0 +1,95 @@ > > +/* { dg-do run { target { powerpc64*-*-* && { lp64

Re: [PATCH, cleanup] Remove PowerPC -mupper-regs-* options

2017-07-24 Thread Segher Boessenkool
On Mon, Jul 24, 2017 at 04:06:45PM -0400, Michael Meissner wrote: > > > +/* { dg-final { scan-assembler-times {\mfctidz\M|\mxscvdpsxds\M} 2 } } */ > > > > You could write {\m(fctidz|xscvdpsxds)\M} which may be easier to read. > > Come to think of it, we could do e.g. {\m(lwz)\M} as well. Not s

Re: [PATCH 2/6] gimple-ssa-store-merging.c: fix sort_by_bitpos

2017-07-24 Thread Alexander Monakov
On Sat, 22 Jul 2017, Segher Boessenkool wrote: > On Sat, Jul 15, 2017 at 11:47:45PM +0300, Alexander Monakov wrote: > > --- a/gcc/gimple-ssa-store-merging.c > > +++ b/gcc/gimple-ssa-store-merging.c > > @@ -516,12 +516,12 @@ sort_by_bitpos (const void *x, const void *y) > >store_immediate_info

Re: [PATCH][RFA/RFC] Stack clash mitigation patch 01/08 V2

2017-07-24 Thread Jeff Law
On 07/24/2017 02:57 AM, Segher Boessenkool wrote: >> Sadly, there's no way short of listing them and keeping that list >> up-to-date over time by hand. If we want to do that, I would suggest >> we note the processors with full support as well as those with partial >> support using the -fstack-chec

Re: [PATCH, cleanup] Remove PowerPC -mupper-regs-* options

2017-07-24 Thread Michael Meissner
On Mon, Jul 24, 2017 at 05:21:15AM -0500, Segher Boessenkool wrote: > Hi Mike, > > On Sat, Jul 22, 2017 at 02:46:04AM -0400, Michael Meissner wrote: > > One thing that I did was continue to define __UPPER_REGS_{DF,SF,DI}__ that > > were > > previously defined. I can delete them if desired and pe

Re: [PATCH 01/17] Add param-type-mismatch.c/C testcases as a baseline

2017-07-24 Thread Eric Gallager
On Mon, Jul 24, 2017 at 4:04 PM, David Malcolm wrote: > Amongst other things, this patch kit aims to improve our handling > of mismatched types within function calls. > > For example, given: > > extern int callee_1 (int one, const char *two, float three); > > int test_1 (int first, int second,

[PATCH 16/17] Language Server Protocol: proof-of-concept GCC implementation

2017-07-24 Thread David Malcolm
This patch implements a concrete subclass of the lsp::server class implemented in the previous patch, wiring it up to GCC's internal representation. The patch is very much just a proof-of-concept; the only method it implements is "textDocument/definition" i.e. "report the definition of the symbol

[PATCH 05/17] C++ frontend: capture BLT information

2017-07-24 Thread David Malcolm
This patch extends the C++ frontend so that it optionally builds a BLT tree, by using an auto_blt_node class within the recursive descent through the parser, so that its ctor/dtors build the blt_node hierarchy; this is rapidly (I hope) rejected in the no -fblt case, so that by default, no blt nodes

[PATCH 04/17] C frontend: capture BLT information

2017-07-24 Thread David Malcolm
This patch extends the C frontend so that it optionally builds a BLT tree, by using an auto_blt_node class within the recursive descent through the parser, so that its ctor/dtors build the blt_node hierarchy; this is rapidly (I hope) rejected in the no -fblt case, so that by default, no blt nodes a

[PATCH 08/17] C: highlight return types when complaining about mismatches

2017-07-24 Thread David Malcolm
This patch to the C frontend uses the BLT infrastructure to highlight the return type of a function when complaining about code within the function that doesn't match it. For example, given: warning: 'return' with a value, in function returning void return 42; ^~ note: declar

[PATCH 09/17] C++: highlight return types when complaining about mismatches

2017-07-24 Thread David Malcolm
This patch to the C++ frontend uses the BLT infrastructure to highlight the return type of a function when complaining about code within the function that doesn't match it. For example, given: error: return-statement with a value, in function returning 'void' [-fpermissive] return 42;

[PATCH 06/17] C: use BLT to highlight parameter of callee decl for mismatching types

2017-07-24 Thread David Malcolm
This patch to the C frontend uses the BLT infrastructure to improve: extern int callee_1 (int one, const char *two, float three); int test_1 (int first, int second, float third) { return callee_1 (first, second, third); } from: warning: passing argument 2 of 'callee_1' makes point

[PATCH 14/17] Add implementation of JSON-RPC

2017-07-24 Thread David Malcolm
This patch adds an abstract base class for implementing JSON-RPC 2.0 servers, along with a class for wiring them up to the HTTP server class implemented in the previous patch, supporting the serving of JSON-RPC over HTTP on a port. gcc/ChangeLog: * Makefile.in (OBJS): Add json-rpc.o.

[PATCH 07/17] C++: use BLT to highlight parameter of callee decl for mismatching types

2017-07-24 Thread David Malcolm
This patch to the C++ frontend uses the BLT infrastructure to improve: extern int callee_1 (int one, const char *two, float three); int test_1 (int first, int second, float third) { return callee_1 (first, second, third); } from: error: invalid conversion from 'int' to 'const char

[PATCH 11/17] Add JSON implementation

2017-07-24 Thread David Malcolm
This patch is the first part of the Language Server Protocol server proof-of-concept. It adds support to gcc for reading and writing JSON, based on DOM-like trees of "json::value" instances. gcc/ChangeLog: * Makefile.in (OBJS): Add json.o. * json.c: New file. * json.h: New

[PATCH 15/17] Language Server Protocol: add lsp::server abstract base class

2017-07-24 Thread David Malcolm
This patch adds an lsp::server abstract base class for implementing servers for the Language Server Protocol: https://github.com/Microsoft/language-server-protocol along with supporting classes mirroring those from the protocol description. The public specification of the protocol uses CamelCas

[PATCH 17/17] Language Server Protocol: work-in-progess on testsuite

2017-07-24 Thread David Malcolm
This file adds the beginnings of a testsuite for the LSP implementation. The test cases are implemented in Python; they aren't currently wired up to DejaGnu (I've been invoking them manually). There's an automated test case, and a PyGTK UI. Both require the language server to be manually started

[PATCH 13/17] Add http-server.h and http-server.c

2017-07-24 Thread David Malcolm
This patch implements an abstract class of HTTP server, as a subclass of the server class implemented in the previous patch. gcc/ChangeLog: * Makefile.in (OBJS): Add http-server.o. * http-server.c: New file. * http-server.h: New file. * selftest-run-tests.c (selftes

[PATCH 12/17] Add server.h and server.c

2017-07-24 Thread David Malcolm
This patch adds a "server" abstract base class for listening on a port, for use by the later patches to implement an LSP server. It's largely adapted from examples in glibc's docs. I suspect that I've introduced platform-specific assumptions (and that it may need some extra configure tests for th

[PATCH 10/17] C++: provide fix-it hints in -Wsuggest-override

2017-07-24 Thread David Malcolm
This patch to the C++ frontend extends -Wsuggest-override so that the suggestions contain fix-it hints, provided that it can get at the correct location. Doing so requires the blt_node infrastructure. gcc/cp/ChangeLog: * class.c: Include "gcc-rich-location.h" and "blt.h". (check_f

[PATCH 02/17] diagnostics: support prefixes within diagnostic_show_locus

2017-07-24 Thread David Malcolm
This patch reworks diagnostic_show_locus so that it respects the prefix of the pretty_printer. This is used later in the patch kit for embedding source dumps within a hierarchical tree-like dump, by using the ASCII art for the tree as the prefix. gcc/c-family/ChangeLog: * c-opts.c (c_diag

[PATCH 01/17] Add param-type-mismatch.c/C testcases as a baseline

2017-07-24 Thread David Malcolm
Amongst other things, this patch kit aims to improve our handling of mismatched types within function calls. For example, given: extern int callee_1 (int one, const char *two, float three); int test_1 (int first, int second, float third) { return callee_1 (first, second, third); } t

[PATCH 03/17] Core of BLT implementation

2017-07-24 Thread David Malcolm
This patch implements the core of the new "blt" type: an optional "on-the-side" hierarchical recording of source ranges, associated with grammar productions, with a sparse mapping to our regular "tree" type. Caveats: * the name is a placeholder (see the comment in blt.h) * I'm ignoring memory mana

[PATCH 00/17] RFC: New source-location representation; Language Server Protocol

2017-07-24 Thread David Malcolm
We currently capture some source location information in the frontends, but there are many kinds of source entity for which we *don't* retain the location information after the initial parse. For example, in the C/C++ frontends: * we don't capture the locations of the individual parameters with

Re: Add -Wsuggest-attribute=cold

2017-07-24 Thread Jan Hubicka
> On Mon, Jul 24, 2017 at 2:56 PM, Jan Hubicka wrote: > > Hi, > > this patch adds -Wsuggest-attribute=cold because we can now statically > > detect > > cold functions atuomatically. > > > > Bootstrapped/regtested x86_64-linux. Plan to commit it tomorrow if there > > are no > > complains. > > > >

Re: Add -Wsuggest-attribute=cold

2017-07-24 Thread Eric Gallager
On Mon, Jul 24, 2017 at 2:56 PM, Jan Hubicka wrote: > Hi, > this patch adds -Wsuggest-attribute=cold because we can now statically detect > cold functions atuomatically. > > Bootstrapped/regtested x86_64-linux. Plan to commit it tomorrow if there are > no > complains. > > Honza > > * invo

Add -Wsuggest-attribute=cold

2017-07-24 Thread Jan Hubicka
Hi, this patch adds -Wsuggest-attribute=cold because we can now statically detect cold functions atuomatically. Bootstrapped/regtested x86_64-linux. Plan to commit it tomorrow if there are no complains. Honza * invoke.texi (Wsuggest-attribute=cold): Document. * common.opt (Wsugge

Re: [00/77] Add wrapper classes for machine_modes

2017-07-24 Thread Richard Biener
On July 24, 2017 3:42:30 PM GMT+02:00, Segher Boessenkool wrote: >On Mon, Jul 24, 2017 at 01:52:49PM +0100, Richard Sandiford wrote: >> Segher Boessenkool writes: >> > On Mon, Jul 24, 2017 at 10:28:06AM +0100, Richard Sandiford wrote: >> >> > From what I can tell so far it makes things much hard

Re: [PATCH 2/2] passes: Print a header in emergency_dump_function

2017-07-24 Thread Richard Biener
On July 24, 2017 3:54:06 PM GMT+02:00, Segher Boessenkool wrote: >Currently the emergency dump has no separation whatsoever from any >previous output in the dump file, making it harder than necessary >to find. OK. > >Segher > > >2017-07-24 Segher Boessenkool > > * passes.c (emergency_d

Re: [PATCH 1/2] cfgrtl: Don't crash in rtl_dump_bb if BB_END(bb) is NULL

2017-07-24 Thread Richard Biener
On July 24, 2017 3:54:05 PM GMT+02:00, Segher Boessenkool wrote: >Currently rtl_dump_bb crashes if BB_END(bb) is NULL, like it can be >during expand (rtl_dump_bb can be called at any time, by the emergency >dump added recently for example). Ick. >This fixes it. OK. Richard. > >Segher > > >20

Re: [PATCH V2] improve bitmap / sbitmap compatability of bitmap_set_bit

2017-07-24 Thread Richard Biener
On July 24, 2017 7:05:14 PM GMT+02:00, tbsaunde+...@tbsaunde.org wrote: >From: Trevor Saunders > >This makes the sbitmap version return true if the bit was previously >unset to make it similar to the bitmap version. > >I believe I fixed up the comments from may, and rebootstrapped + >regtested >pp

Re: [PATCH] PR driver/81523: Make -static override -pie

2017-07-24 Thread H.J. Lu
On Sun, Jul 23, 2017 at 8:14 AM, H.J. Lu wrote: > -static and -pie together behave differently depending on whether GCC is > configured with --enable-default-pie. On x86, "-static -pie" fails to > create executable when --enable-default-pie isn't used, but creates a > static executable when --ena

Re: [PATCH AArch64]Fix ICE in cortex-a57 fma steering pass

2017-07-24 Thread James Greenhalgh
On Thu, Jul 20, 2017 at 09:53:41AM +0100, Bin.Cheng wrote: > On Fri, Jul 14, 2017 at 12:12 PM, James Greenhalgh > wrote: > > On Wed, Jul 12, 2017 at 03:15:04PM +, Bin Cheng wrote: > >> Hi, > >> After change @236817, AArch64 backend could avoid unnecessary conversion > >> instructions for regis

Re: [PATCH][AArch64] Fix PR79041

2017-07-24 Thread James Greenhalgh
On Fri, Jul 21, 2017 at 12:22:00PM +0100, Wilco Dijkstra wrote: > >   > ping > >     > As described in PR79041, -mcmodel=large -mpc-relative-literal-loads > may be used to avoid generating ADRP/ADD or ADRP/LDR.  However both > trunk and GCC7 may still emit ADRP for some constant pool literals

[PATCH V2] improve bitmap / sbitmap compatability of bitmap_set_bit

2017-07-24 Thread tbsaunde+gcc
From: Trevor Saunders This makes the sbitmap version return true if the bit was previously unset to make it similar to the bitmap version. I believe I fixed up the comments from may, and rebootstrapped + regtested ppc64le-linux-gnu, ok? Trev gcc/ChangeLog: 2017-07-20 Trevor Saunders

Re: [PATCH] Fix expand_builtin_atomic_fetch_op for pre-op (PR80902)

2017-07-24 Thread Segher Boessenkool
On Fri, Jul 07, 2017 at 06:56:09AM -0500, Segher Boessenkool wrote: > On Thu, Jun 22, 2017 at 10:59:05PM -0600, Jeff Law wrote: > > On 05/28/2017 06:31 AM, Segher Boessenkool wrote: > > > __atomic_add_fetch adds a value to some memory, and returns the result. > > > If there is no direct support for

Re: [PATCH GCC][1/2]Feed bound computation to folder in loop split

2017-07-24 Thread Marc Glisse
On Mon, 24 Jul 2017, Bin.Cheng wrote: On Mon, Jul 24, 2017 at 3:31 PM, Marc Glisse wrote: On Mon, 24 Jul 2017, Bin.Cheng wrote: On Mon, Jul 24, 2017 at 2:59 PM, Marc Glisse wrote: On Mon, 24 Jul 2017, Bin.Cheng wrote: But since definition of _197 isn't in current stmt sequence, call "o3

Re: [PATCH GCC][1/2]Feed bound computation to folder in loop split

2017-07-24 Thread Bin.Cheng
On Mon, Jul 24, 2017 at 3:31 PM, Marc Glisse wrote: > On Mon, 24 Jul 2017, Bin.Cheng wrote: > >> On Mon, Jul 24, 2017 at 2:59 PM, Marc Glisse wrote: >>> >>> On Mon, 24 Jul 2017, Bin.Cheng wrote: >>> But since definition of _197 isn't in current stmt sequence, call "o31 = do_valueize (va

Re: [PATCH GCC][1/2]Feed bound computation to folder in loop split

2017-07-24 Thread Marc Glisse
On Mon, 24 Jul 2017, Bin.Cheng wrote: On Mon, Jul 24, 2017 at 2:59 PM, Marc Glisse wrote: On Mon, 24 Jul 2017, Bin.Cheng wrote: But since definition of _197 isn't in current stmt sequence, call "o31 = do_valueize (valueize, o31)" will return NULL. As a result, it's not matched. Wait, act

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

2017-07-24 Thread Bin.Cheng
Ping^1. Thanks, bin On Mon, Jul 10, 2017 at 9:23 AM, Bin.Cheng wrote: > On Tue, Jul 4, 2017 at 1:29 PM, Richard Biener > wrote: >> On Tue, Jul 4, 2017 at 2:06 PM, Bin.Cheng wrote: >>> On Tue, Jul 4, 2017 at 12:19 PM, Richard Biener >>> wrote: On Mon, Jul 3, 2017 at 4:17 PM, Bin.Cheng wr

Re: [PATCH GCC][1/2]Feed bound computation to folder in loop split

2017-07-24 Thread Bin.Cheng
On Mon, Jul 24, 2017 at 2:59 PM, Marc Glisse wrote: > On Mon, 24 Jul 2017, Bin.Cheng wrote: > >> But since definition of _197 isn't in current stmt sequence, call "o31 >> = do_valueize (valueize, o31)" will return NULL. As a result, it's >> not matched. > > > Wait, actually, how was your fold_bui

Re: [PATCH] Fix wrong condition in ipa-visibility.c (PR ipa/81520).

2017-07-24 Thread Jan Hubicka
> >From 046931ec490d20a6c003094367f7f0bfae64647f Mon Sep 17 00:00:00 2001 > From: marxin > Date: Mon, 24 Jul 2017 11:21:18 +0200 > Subject: [PATCH] Fix wrong condition in ipa-visibility.c (PR ipa/81520). > > gcc/ChangeLog: > > 2017-07-24 Martin Liska > > PR ipa/81520 > * ipa-visi

Re: [PATCH GCC][1/2]Feed bound computation to folder in loop split

2017-07-24 Thread Marc Glisse
On Mon, 24 Jul 2017, Bin.Cheng wrote: But since definition of _197 isn't in current stmt sequence, call "o31 = do_valueize (valueize, o31)" will return NULL. As a result, it's not matched. Wait, actually, how was your fold_build* version working? Why was the first addition "in the current ge

[PATCH 1/2] cfgrtl: Don't crash in rtl_dump_bb if BB_END(bb) is NULL

2017-07-24 Thread Segher Boessenkool
Currently rtl_dump_bb crashes if BB_END(bb) is NULL, like it can be during expand (rtl_dump_bb can be called at any time, by the emergency dump added recently for example). This fixes it. Segher 2017-07-24 Segher Boessenkool * gcc/cfgrtl.c (rtl_dump_bb): Don't call NEXT_INSN on NUL

[PATCH 2/2] passes: Print a header in emergency_dump_function

2017-07-24 Thread Segher Boessenkool
Currently the emergency dump has no separation whatsoever from any previous output in the dump file, making it harder than necessary to find. Segher 2017-07-24 Segher Boessenkool * passes.c (emergency_dump_function): Print some empty lines and a header before the RTL dump.

Re: [PATCH GCC][1/2]Feed bound computation to folder in loop split

2017-07-24 Thread Bin.Cheng
On Mon, Jul 24, 2017 at 1:16 PM, Marc Glisse wrote: > On Mon, 24 Jul 2017, Bin.Cheng wrote: > >>> For _123, we have >>> >>> /* (A +- CST1) +- CST2 -> A + CST3 >>> or >>> /* Associate (p +p off1) +p off2 as (p +p (off1 + off2)). */ >>> >>> >>> For _115, we have >>> >>> /* min (a, a + CST) -> a w

Re: [00/77] Add wrapper classes for machine_modes

2017-07-24 Thread Segher Boessenkool
On Mon, Jul 24, 2017 at 01:52:49PM +0100, Richard Sandiford wrote: > Segher Boessenkool writes: > > On Mon, Jul 24, 2017 at 10:28:06AM +0100, Richard Sandiford wrote: > >> > From what I can tell so far it makes things much harder to read. > >> > Perhaps that is just because this is all new. > >>

Re: [00/77] Add wrapper classes for machine_modes

2017-07-24 Thread Richard Sandiford
Segher Boessenkool writes: > On Mon, Jul 24, 2017 at 10:28:06AM +0100, Richard Sandiford wrote: >> > From what I can tell so far it makes things much harder to read. >> > Perhaps that is just because this is all new. >> >> Which parts specifically? E.g. is it mostly the is_a (x, &y) changes? >>

[PATCH] Fix wrong condition in ipa-visibility.c (PR ipa/81520).

2017-07-24 Thread Martin Liška
Hi. The patch fixed PR mentioned in subject of this email. We should not call the transformation on targets that do not support aliases. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. Apart from that, can you Yuri please take a look at failing test-case on ppc64le:

Re: [PATCH v2] New C++ warning option '-Waccess-specifiers'

2017-07-24 Thread Franz Sirl
Am 2017-07-24 um 00:19 schrieb Volker Reichelt: On 23 Jul, Eric Gallager wrote: On 7/23/17, Volker Reichelt wrote: Hi again, here is an updated patch for a new warning about redundant access-specifiers. It takes Dave's various comments into account. The main changes w.r.t. to the previous ve

Re: [PATCH GCC][1/2]Feed bound computation to folder in loop split

2017-07-24 Thread Marc Glisse
On Mon, 24 Jul 2017, Bin.Cheng wrote: For _123, we have /* (A +- CST1) +- CST2 -> A + CST3 or /* Associate (p +p off1) +p off2 as (p +p (off1 + off2)). */ For _115, we have /* min (a, a + CST) -> a where CST is positive. */ /* min (a, a + CST) -> a + CST where CST is negative. */ (simpli

Re: [PATCH] Optimize BB sorting in domwalk

2017-07-24 Thread Ulrich Drepper
Not commenting on the correctness... but On Mon, Jul 24, 2017 at 1:29 PM, Alexander Monakov wrote: > + basic_block bb0 = bbs[0], bb1 = bbs[1]; > + if (bb_postorder[bb0->index] < bb_postorder[bb1->index]) > + bbs[0] = bb1, bbs[1] = bb0; > +} > + else if (__builtin_expect (n ==

Re: [PATCH] Kill TYPE_METHODS 0/9

2017-07-24 Thread Nathan Sidwell
On 07/24/2017 05:25 AM, Jakub Jelinek wrote: On Fri, Jul 14, 2017 at 12:44:08PM -0400, Nathan Sidwell wrote: Seems TYPE_METHODS have been left in a couple of spots. For winnt-cxx.c it apparently causes bootstrap failure (I have no way to test it for that target, but given that the bootstrap i

Re: [PATCH GCC][1/2]Feed bound computation to folder in loop split

2017-07-24 Thread Bin.Cheng
On Fri, Jun 16, 2017 at 5:48 PM, Marc Glisse wrote: > On Fri, 16 Jun 2017, Bin.Cheng wrote: > >> On Fri, Jun 16, 2017 at 5:16 PM, Richard Biener >> wrote: >>> >>> >>> That means we miss a pattern in match.PD to handle this case. >> >> I see. I will withdraw this patch and look in that direction.

Re: [AArch64, Patch] Generate MLA when multiply + add vector by scalar

2017-07-24 Thread James Greenhalgh
On Fri, Jul 21, 2017 at 12:41:41PM +0100, Jackson Woodruff wrote: > Hi all, > > This merges vector multiplies and adds into a single mla instruction > when the multiplication is done by a scalar. > > Currently, for the following: > > typedef int __attribute__((vector_size(16))) vec; > >

[PATCH] Optimize BB sorting in domwalk

2017-07-24 Thread Alexander Monakov
Profiling uses of qsort in GCC reveals that a significant portion of calls comes from domwalk.c where child nodes in dominator tree are reordered according to postorder numbering. However we know that in dominator trees the vast majority of nodes have 0, 2 or 3 children, and handling those cases s

Re: [GCC][PATCH][AArch64] Optimize x * copysign (1.0, y) [Patch (2/2)]

2017-07-24 Thread James Greenhalgh
On Mon, Jul 10, 2017 at 04:49:13PM +0100, Tamar Christina wrote: > Hi All, > > As the mid-end patch has been respun I've had to respin this one as well. > So this is a new version and a ping as well. > > The patch provides AArch64 optabs for XORSIGN, both vectorized and scalar. > > This patch i

Re: [patch, libfortran] Fix PR 80365, undefined memcpy

2017-07-24 Thread Thomas Koenig
Hi Janne, On Sun, Jul 23, 2017 at 10:23 PM, Thomas Koenig wrote: Hello world, the attached test cases fixes a problematic invocation of memcpy where src=NULL and n=0 by simply doing nothing in the surrounding function if there is nothing to be done. No test case, because this only shows up w

Re: [00/77] Add wrapper classes for machine_modes

2017-07-24 Thread Segher Boessenkool
On Mon, Jul 24, 2017 at 10:28:06AM +0100, Richard Sandiford wrote: > > So what does it change in the interfaces we use? I couldn't find an > > update of documentation, maybe I missed it (it's a huge series :-) ) > > An overview of the new interfaces (and how they are used) would help. > > You did

Re: [PATCH] vec_merge + vec_duplicate + vec_concat simplification

2017-07-24 Thread James Greenhalgh
On Tue, Jun 06, 2017 at 09:35:10AM +0100, Kyrill Tkachov wrote: > Hi all, > > Another vec_merge simplification that's missing is transforming: > (vec_merge (vec_duplicate x) (vec_concat (y) (z)) (const_int N)) > into > (vec_concat x z) if N == 1 (0b01) or > (vec_concat y x) if N == 2 (0b10) > > F

[patch, fortran, committed] Show binding label on dump

2017-07-24 Thread Thomas Koenig
Hello world, I have just committed the attached patch as obvious and simple after testing. Regards Thomas 2017-07-24 Thomas Koenig * dump-parse-tree.c (show_symbol): Show binding label if present. Index: dump-parse-tree.c ===

Re: [PATCH, cleanup] Remove PowerPC -mupper-regs-* options

2017-07-24 Thread Segher Boessenkool
Hi Mike, On Sat, Jul 22, 2017 at 02:46:04AM -0400, Michael Meissner wrote: > One thing that I did was continue to define __UPPER_REGS_{DF,SF,DI}__ that > were > previously defined. I can delete them if desired and perhaps poison the names > so that any use if flaged. I don't think anything uses

Re: [PATCH] Simplify vec_merge of vec_duplicate with const_vector

2017-07-24 Thread James Greenhalgh
On Tue, Jun 06, 2017 at 09:25:51AM +0100, Kyrill Tkachov wrote: > Hi all, > > I'm trying to improve some of the RTL-level handling of vector lane > operations on aarch64 and that involves dealing with a lot of vec_merge > operations. One simplification that I noticed missing from simplify-rtx are

Re: [patch, libfortran] Fix PR 80365, undefined memcpy

2017-07-24 Thread Janne Blomqvist
On Sun, Jul 23, 2017 at 10:23 PM, Thomas Koenig wrote: > Hello world, > > the attached test cases fixes a problematic invocation of > memcpy where src=NULL and n=0 by simply doing nothing > in the surrounding function if there is nothing to be done. > > No test case, because this only shows up wit

Re: [00/77] Add wrapper classes for machine_modes

2017-07-24 Thread Richard Sandiford
Segher Boessenkool writes: > Hi Richard, > > On Thu, Jul 13, 2017 at 09:35:44AM +0100, Richard Sandiford wrote: >> This series is an update of: >> >> https://gcc.gnu.org/ml/gcc-patches/2016-12/msg00766.html >> >> It adds a group of wrapper classes around machine_mode for modes that >> are kn

Re: [PATCH] Kill TYPE_METHODS 0/9

2017-07-24 Thread Jakub Jelinek
On Fri, Jul 14, 2017 at 12:44:08PM -0400, Nathan Sidwell wrote: > This is a series of patches that remove the TYPE_METHODS field used in > records & unions. Currently TYPE_METHODS hods a the member functions (be > they static or non-static), and TYPE_FIELDS holds everything else (be they > FIELD_D

Re: [PATCH, RFC] Proposed PowerPC IEEE 128-bit floating point changes

2017-07-24 Thread Segher Boessenkool
On Fri, Jul 21, 2017 at 03:17:57PM -0400, Michael Meissner wrote: > The first change is to enable the C language to use _Float128 keyword (but not > __float128) without having to use the -mfloat128 option on power7-power9 > systems. My question is in the TR that introduced _Float128, is there any

Re: [PATCH][RFA/RFC] Stack clash mitigation patch 01/08 V2

2017-07-24 Thread Segher Boessenkool
On Fri, Jul 21, 2017 at 11:36:05AM -0600, Jeff Law wrote: > On 07/20/2017 07:23 AM, Segher Boessenkool wrote: > > On Tue, Jul 18, 2017 at 11:17:19PM -0600, Jeff Law wrote: > > I think the documentation for the new option should say this only > > provides partial protection on targets that do not ha

Re: [PATCH 1/2] simplify-rtx: The truncation of an IOR can have all bits set (PR81423)

2017-07-24 Thread Segher Boessenkool
On Wed, Jul 19, 2017 at 12:19:32AM -0600, Jeff Law wrote: > On 07/18/2017 01:36 PM, Segher Boessenkool wrote: > > * simplify-rtx.c (simplify_truncation): Handle truncating an IOR > > with a constant that is -1 in the truncated to mode. > OK. A testcase would be advisable :-) > > jeff Lik

[PATCH 6/7] [ARC] Reimplement ZOL support.

2017-07-24 Thread Claudiu Zissulescu
From: claziss 2017-05-22 Claudiu Zissulescu * config/arc/arc-c.c (__ARC_LPC_WIDTH__): Add builtin define. * config/arc/arc.c (ARC_MAX_LOOP_LENGTH): Define. (arc_conditional_register_usage): Remove ARC600 lp_count exception. (arc_file_start): Emit Tag_ARC

[PATCH 7/7] [ARC] Fix errors in arc_ifcvt.

2017-07-24 Thread Claudiu Zissulescu
From: claziss The arc_ifcvt procedure is removing a label even when it is used by another jump. This patch fixes dg.exp/pr31507-1.c. gcc/ 2017-07-10 Claudiu Zissulescu * config/arc/arc.c (arc_ifcvt): Remove use of merge_blocks call. (arc_ccfsm_advance): Fix checking for dela

[PATCH 5/7] [ARC] Update various patterns

2017-07-24 Thread Claudiu Zissulescu
From: claziss gcc/ 2017-04-25 Claudiu Zissulescu * config/arc/arc.md (movqi_insn): Add stores to save constant long immediates. (movhi_insn): Update store instruction constraint which are saving 6-bit short immediates. (movsi_insn): Consider also short

[PATCH 3/7] [ARC] Update can_follow_jump hook helper.

2017-07-24 Thread Claudiu Zissulescu
From: claziss Short branches cannot be used to jump between hot/cold sections. Update the hook. gcc/ 2017-04-26 Claudiu Zissulescu * config/arc/arc.c (arc_can_follow_jump): Check for short branches. --- gcc/config/arc/arc.c | 3 +++ 1 file changed, 3 insertions(+) diff --gi

[PATCH 4/7] [ARC] Use TARGET_USE_ANCHORS_FOR_SYMBOL_P.

2017-07-24 Thread Claudiu Zissulescu
From: Claudiu Zissulescu We don't want to use anchors for small data: the GP register acts as an anchor in that case. We also don't want to use them for PC-relative accesses, where the PC acts as an anchor. TLS symbols require special accesses as well, don't use anchors for such symbols. gcc

[PATCH 2/7] [ARC] Use -G option to control sdata behavior

2017-07-24 Thread Claudiu Zissulescu
From: claziss Add support for -G option to ARC backend. gcc/ 2017-04-24 Claudiu Zissulescu * config.gcc: Use g.opt for arc. * config/arc/arc.c (LEGITIMATE_SCALED_ADDRESS_P): Deleted, functionality moved to ... (legitimate_scaled_address_p): New function, ...he

[PATCH 1/7] [ARC] Improves and fixes for small data support.

2017-07-24 Thread Claudiu Zissulescu
From: Claudiu Zissulescu Add alignment check for short load/store instructions used for sdata, as they request 32-bit aligned short immediate. Use sdata symbol alignment information and emit scalled loads/stores whenever is possible. The scalled address will extend the access range for sdata sym

[PATCH 0/7] [ARC] SDATA and ZOL updates.

2017-07-24 Thread Claudiu Zissulescu
From: claziss Hi Andrew, Please find a new series of ARC patches that improves/fixes a number of key ARC features like: * SDATA updates: there are two patches, one is cleaning up, improves the existing sdata implementation, while the second one adds support for -G option to our target. -G opt

[PATCH TEST]Require vect_perm in gcc.dg/vect/pr80815-3.c

2017-07-24 Thread Bin Cheng
Hi, The test has negative step in memory access, thus can't be vectorized on target like sparc-sun-solaris2.12. This patch adds vect_perm requirement for it. Test result checked. Is it OK? Thanks, bin gcc/testsuite/ChangeLog 2017-07-20 Bin Cheng * gcc.dg/vect/pr80815-3.c: Require ve

[PATCH GCC]Make pointer overflow always undefined and remove the macro

2017-07-24 Thread Bin Cheng
Hi, This is a followup patch to PR81388's fix. According to Richi, POINTER_TYPE_OVERFLOW_UNDEFINED was added in -fstrict-overflow warning work. Given: A) strict-overflow was removed; B) memory object can not wrap in address space; C) existing code doesn't take it in consideration, as in now

[patch] Ad PR81487: More asprintf -> xasprintf replacements

2017-07-24 Thread Georg-Johann Lay
Hi, as proposed in https://gcc.gnu.org/ml/gcc-patches/2017-07/msg01294.html this patch does more asprintf -> xasprintf replacements. Bootstrapped + reg-tested on x86_64-linux. Ok for trunk? Johann gcc/ PR 81487 * hsa-brig.c (brig_init): Use xasprintf instead of asprintf.

[PING*2][PATCH] [PR79542][Ada] Fix ICE in dwarf2out.c with nested func. inlining

2017-07-24 Thread Pierre-Marie de Rodat
I would like to ping for the updated patch, originally submitted at . Thank you in advance! -- Pierre-Marie de Rodat

  1   2   >