Re: Patch ping

2017-07-27 Thread Richard Biener
On Wed, 26 Jul 2017, Jakub Jelinek wrote: > On Wed, Jul 26, 2017 at 04:13:30PM +0200, Richard Biener wrote: > > > > You don't seem to use 'size' anywhere. > > > > > > size I thought about but then decided not to do anything with it. > > > There are two cases, one is where there is no ADDR_EXPR a

[PATCH] libstdc++: Support std::is_aggregate on clang++ (was [cfe-dev] clang++: std::is_aggregate unusable with clang-5.0/libstdc++-7)

2017-07-27 Thread Katsuhiko Nishimra
>From 56c4a18d0d8c8ce7aa1239880138775e4db06645 Mon Sep 17 00:00:00 2001 From: Katsuhiko Nishimra Date: Thu, 27 Jul 2017 16:03:54 +0900 Subject: [PATCH] libstdc++: Support std::is_aggregate on clang++ Currently, libstdc++ tries to detect __is_aggregate built-in macro using __has_builtin, but this

Re: [PATCH] Fix PR middle-end/81564: ICE in group_case_labels_stmt()

2017-07-27 Thread Richard Biener
On Wed, Jul 26, 2017 at 9:35 PM, Peter Bergner wrote: > The test case for PR81564 exposes an issue where the case labels for a > switch statement point to blocks that have already been removed by an > earlier call to cleanup_tree_cfg(). In that case, the code in > group_case_labels_stmt() that do

Re: [PATCH 0/2] Python testcases to check DWARF output

2017-07-27 Thread Richard Biener
On Wed, Jul 26, 2017 at 11:25 PM, Mike Stump wrote: > On Jul 26, 2017, at 9:00 AM, Pierre-Marie de Rodat > wrote: >> At the last GNU Cauldron, Richard Biener and I talked about DWARF output >> testing. Except for guality tests, which are disabled on several >> targets, the only way tests check t

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

2017-07-27 Thread Richard Biener
On Mon, Jul 24, 2017 at 10:05 PM, David Malcolm wrote: > 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 > d

[patch,v6,committed] Backport PR81487: asprintf -> xasprintf

2017-07-27 Thread Georg-Johann Lay
...also backported to v6: https://gcc.gnu.org/r250573 Johann lto-plugin/ Backport from 2017-07-26 gcc-7-branch r250562. PR lto/81487 * lto-plugin.c (claim_file_handler): Use xasprintf instead of asprintf. [hi!=0]: Swap hi and lo arguments supplied to xaspr

[PATCH] Fix reassoc SSA_NAME reuse (PR tree-optimization/81555, PR tree-optimization/81556)

2017-07-27 Thread Jakub Jelinek
Hi! Reassoc non-parallel rewrite_expr_tree uses changed flag to determine if SSA_NAMEs can't be reused. It is initialized with detected powi or negate optimization and during recursion set also if we detect oe->op != rhs2. This works well if there are no redundant operations removed from the ops

[patch,avr,v6,applied] Backports of: PR81407, PR81305, PR79883 + PR67353.

2017-07-27 Thread Georg-Johann Lay
Applied $subject to gcc-6-branch. Johann https://gcc.gnu.org/r250574 gcc/ Backport from 2017-07-12 trunk r250151. PR target/81407 * config/avr/avr.c (avr_encode_section_info) [progmem && !TREE_READONLY]: Error if progmem object needs constructing. https:

Re: [PATCH] Fix reassoc SSA_NAME reuse (PR tree-optimization/81555, PR tree-optimization/81556)

2017-07-27 Thread Richard Biener
On Thu, 27 Jul 2017, Jakub Jelinek wrote: > Hi! > > Reassoc non-parallel rewrite_expr_tree uses changed flag to determine > if SSA_NAMEs can't be reused. It is initialized with detected powi or > negate optimization and during recursion set also if we detect > oe->op != rhs2. This works well if

[PATCH 00/19] cleanup of memory stats prototypes

2017-07-27 Thread tbsaunde+gcc
From: Trevor Saunders The preC++ way of passing information about the call site of a function was to use a macro that passed __file__, __LINE__, and __FUNCTION__ to a function with the same name with _stat appended to it. The way this is now done with C++ is to have arguments where the default v

[PATCH 03/19] use cxx instead of make_tree_binfo_stat

2017-07-27 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2017-07-27 Trevor Saunders * tree.c (make_tre_binfo_stat): Remove _stat from name. * tree.h (make_tree_binfo_stat): Adjust prototype. (make_tree_binfo): Remove. --- gcc/tree.c | 2 +- gcc/tree.h | 3 +-- 2 files changed, 2 inserti

[PATCH 01/19] use c++ instead of make_node_stat

2017-07-27 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2017-07-27 Trevor Saunders * tree.c (make_node_stat): rename to make_node. (build_tree_list_stat): Adjust. (build0_stat): Likewise. (build2_stat): Likewise. (build3_stat): Likewise. (build4_stat): Likewise.

[PATCH 02/19] use c++ instead of _stat for copy_node_stat

2017-07-27 Thread tbsaunde+gcc
From: Trevor Saunders gcc/cp/ChangeLog: 2017-07-27 Trevor Saunders * lex.c (copy_decl): Adjust. (copy_type): Likewise. gcc/ChangeLog: 2017-07-27 Trevor Saunders * tree.c (copy_node_stat): Rename to copy_node. (build_distinct_type_copy): Adjust. *

[PATCH 08/19] use c++ instead of build_decl_stat

2017-07-27 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2017-07-27 Trevor Saunders * tree.c (build_decl_stat): Remove _stat from name. * tree.h (build_decl): Remove macro. --- gcc/tree.c | 2 +- gcc/tree.h | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/gcc/tree.c b/g

[PATCH 07/19] replace gimple_alloc_stat with c++

2017-07-27 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2017-07-27 Trevor Saunders * gimple.c (gimple_build_with_ops_stat): Adjust. (gimple_alloc_stat): Remove _stat from name. * gimple.h (gimple_alloc): Remove macro. --- gcc/gimple.c | 4 ++-- gcc/gimple.h | 3 +-- 2 files changed, 3

[PATCH 10/19] use c++ for tree_cons_stat

2017-07-27 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2017-07-27 Trevor Saunders * tree.c (tree_cons_stat): Remove _stat from name. * tree.h (tree_cons): Remove macro. --- gcc/tree.c | 2 +- gcc/tree.h | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/gcc/tree.c b/gcc/t

[PATCH 04/19] use c++ for make_int_cst_stat

2017-07-27 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2017-07-27 Trevor Saunders * tree.c (make_int_cst_stat): Remove _stat from name. * tree.h (make_int_cst_stat): Adjust prototype. (make_int_cst): Remove macro. --- gcc/tree.c | 2 +- gcc/tree.h | 4 +--- 2 files changed, 2 insertio

[PATCH 11/19] remove unused build_var_debug_value prototype

2017-07-27 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2017-07-27 Trevor Saunders * tree.h (build_var_debug_value): Remove prototype. --- gcc/tree.h | 4 1 file changed, 4 deletions(-) diff --git a/gcc/tree.h b/gcc/tree.h index 7ecfb947fe2..d765c31cda3 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @

[PATCH 06/19] use c++ instead of {make,grow}_tree_vec_stat

2017-07-27 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2017-07-27 Trevor Saunders * tree.c (make_tree_vec_stat): Remove _stat from name. (grow_tree_vec_stat): Likewise. * tree.h (make_tree_vec_stat): Adjust prototype. (grow_tree_vec_stat): Likewise. (make_tree_vec): Rem

[PATCH 05/19] use c++ instead of buildN_stat{,_loc}

2017-07-27 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2017-07-27 Trevor Saunders * fold-const.c (fold_build1_stat_loc): Adjust. (fold_build2_stat_loc): Likewise. (fold_build3_stat_loc): Likewise. * tree.c (build0_stat): Remove _stat from name. (build1_stat): Likewise.

[PATCH 09/19] use c++ instead of build_vl_exp_stat

2017-07-27 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2017-07-27 Trevor Saunders * tree.c (build_vl_exp_stat): Remove _stat from name. * tree.h (build_vl_exp): Remove macro. --- gcc/tree.c | 2 +- gcc/tree.h | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/gcc/tree.c b

[PATCH 14/19] replace rtx_alloc_stat with c++

2017-07-27 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2017-07-27 Trevor Saunders * emit-rtl.c (gen_raw_REG): Adjust. * gengenrtl.c (gendef): Likewise. * rtl.c (rtx_alloc_stat): Remove _stat from name. * rtl.h (rtx_alloc): Remove macro. --- gcc/emit-rtl.c | 2 +- gcc/gengenrt

[PATCH 12/19] use C++ for {make,build}_vector_stat

2017-07-27 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2017-07-27 Trevor Saunders * tree.c (make_vector_stat): Remove _stat from name. (build_vector_stat): Likewise. * tree.h (make_vector_stat): Remove macro. (build_vector_stat): Likewise. --- gcc/tree.c | 4 ++-- gcc/tree.h |

[PATCH 13/19] use c++ for build_tree_list{,_vec}_stat

2017-07-27 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2017-07-27 Trevor Saunders * tree.c (build_tree_list_vec_stat): Remove _stat from name. (build_tree_list_stat): Likewise. * tree.h (build_tree_list): Remove macro. (build_tree_list_vec): Likewise. --- gcc/tree.c | 6 +++---

[PATCH 15/19] replace shallow_copy_rtx_stat with c++

2017-07-27 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2017-07-27 Trevor Saunders * rtl.c (shallow_copy_rtx_stat): Remove _stat from name. * rtl.h (shallow_copy_rtx): Remove macro. --- gcc/rtl.c | 2 +- gcc/rtl.h | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/gcc/rtl.

[PATCH 17/19] use c++ for bitmap_initialize

2017-07-27 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2017-07-27 Trevor Saunders * bitmap.c (bitmap_alloc): Adjust. (bitmap_gc_alloc): Likewise. * bitmap.h (bitmap_initialize_stat): Remove _stat from name. --- gcc/bitmap.c | 4 ++-- gcc/bitmap.h | 3 +-- 2 files changed, 3 insertions

[PATCH 16/19] simplify the bitmap alloc_stat functions with c++

2017-07-27 Thread tbsaunde+gcc
From: Trevor Saunders gcc/fortran/ChangeLog: 2017-07-27 Trevor Saunders * resolve.c (find_reachable_labels): Adjust. gcc/ChangeLog: 2017-07-27 Trevor Saunders * bitmap.c (bitmap_obstack_alloc_stat): Rename to bitmap_alloc. (bitmap_gc_alloc_stat): Rename to bitma

[PATCH 19/19] use c++ for fold_buildN_loc

2017-07-27 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2017-07-27 Trevor Saunders * fold-const.c (fold_build1_stat_loc): Remove _stat from name. (fold_build2_stat_loc): Likewise. (fold_build3_stat_loc): Likewise. * fold-const.h (fold_build1, fold_build2, fold_build3): Adjust.

[PATCH gfortran] PR53542 USE-associated variables shows original instead of renamed symbol name

2017-07-27 Thread Dominique d'Humières
Dear all, I am planning to commit the following patch as obvious (once Tobias has done the debugging) unless someone objects in the coming days. Cheers, Dominique 2017-07-27 Dominique d'Humieres PR fortran/53542 * expr.c (gfc_check_init_expr): Use the renamed name. 2017-07

[PATCH 18/19] use c++ for gimple_build_debug_bind{,_source}

2017-07-27 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2017-07-27 Trevor Saunders * gimple.c (gimple_build_debug_bind_stat): Remove _stat from name. (gimple_build_debug_bind_source_stat): Likewise. * gimple.h (gimple_build_debug_bind): Remove macro. (gimple_build_debug_bind_sou

Re: [PATCH] Backport to GCC7

2017-07-27 Thread Martin Liška
Adding one more that I've just tested. Thanks, Martin >From 96cea83ca9362a5598ab54ed83132cc0ab30a7e7 Mon Sep 17 00:00:00 2001 From: marxin Date: Mon, 17 Jul 2017 11:44:54 + Subject: Backport r250271 gcc/ChangeLog: 2017-07-17 Martin Liska PR sanitizer/81302 * opts.c (finish_options):

Re: Patch ping

2017-07-27 Thread Jakub Jelinek
On Thu, Jul 27, 2017 at 09:19:34AM +0200, Richard Biener wrote: > > I'm building both addresses and subtracting them to get the offset. > > I guess the other option is to compute just the address of the base > > (i.e. base_addr), and add offset (if non-NULL) plus bitpos / BITS_PER_UNIT > > plus off

Re: [PATCH 2/2] Introduce Python testcases to check DWARF output

2017-07-27 Thread Richard Biener
On Wed, Jul 26, 2017 at 6:00 PM, Pierre-Marie de Rodat wrote: > For now, this supports only platforms that have an objdump available for > the corresponding target. There are several things that would be nico to > have in the future: > > * add support for more DWARF dumping tools, such as otool

Re: [PATCH 00/19] cleanup of memory stats prototypes

2017-07-27 Thread Richard Biener
On Thu, Jul 27, 2017 at 10:30 AM, wrote: > From: Trevor Saunders > > The preC++ way of passing information about the call site of a function was to > use a macro that passed __file__, __LINE__, and __FUNCTION__ to a function > with > the same name with _stat appended to it. The way this is now

Ping! [Patch, fortran] PR34640 - ICE when assigning item of a derived-component to a pointer

2017-07-27 Thread Paul Richard Thomas
Hi Jerry, I apologise for the long delay in replying to you. I was on vacation in a location that excluded all but the most meagre emails :-) In addition, my workstation has been in the repair shop for the last couple of weeks and is now the subject of a warranty claim. The span field is added in

Re: [PATCH 1/2] Introduce testsuite support to run Python tests

2017-07-27 Thread Pierre-Marie de Rodat
On 07/26/2017 06:48 PM, David Malcolm wrote: IIRC RHEL 6 has Python 2.6 as its /usr/bin/python (but Python 2.7 is available as a "software collection" add-on). I don't know if gcc as a project would want to support 2.6+ or simply 2.7 for Python 2. I don’t know neither: let’s wait for further f

Re: [PATCH] PR libstdc++/53984 handle exceptions in basic_istream::sentry

2017-07-27 Thread Bin.Cheng
On Wed, Jul 26, 2017 at 11:06 PM, Jonathan Wakely wrote: > On 26/07/17 20:14 +0200, Paolo Carlini wrote: >> >> Hi again, >> >> On 26/07/2017 16:27, Paolo Carlini wrote: >>> >>> Hi, >>> >>> On 26/07/2017 16:21, Andreas Schwab wrote: ERROR: 27_io/basic_fstream/53984.cc: unknown dg option:

Re: [PATCH 1/2] Introduce testsuite support to run Python tests

2017-07-27 Thread Matthias Klose
you are unconditionally hard coding python as the interpreter, which on most distributions points to 2.7. Please check python3 as well and make that the preferred interpreter if available. python 2.7 is now EOL'd for 2020. Matthias On 26.07.2017 18:00, Pierre-Marie de Rodat wrote: > gcc/testsuit

Re: [PATCH 2/2] Introduce Python testcases to check DWARF output

2017-07-27 Thread Pierre-Marie de Rodat
On 07/26/2017 07:09 PM, David Malcolm wrote: +If `single_cu` is True, make sure there is exactly one compilation unit and "is True" -> "is true" Fixed. +:param bool or_error: When True, if `single` is True and no attribute "True" -> "true" in two places Fixed. +:pa

Re: [PATCH 0/2] Python testcases to check DWARF output

2017-07-27 Thread Pierre-Marie de Rodat
Thank you for your feedback. On 07/27/2017 09:52 AM, Richard Biener wrote: I'm fine with the direction if a reviewer wants to go in that direction. I wish python didn't have a built-in speed penalty, that's the only downside I don't like about it. Aside from that, even switching all of the tes

Re: [PATCH] Move static chain and non-local goto init after NOTE_INSN_FUNCTION_BEG (PR sanitize/81186).

2017-07-27 Thread Martin Liška
On 07/25/2017 02:49 PM, Jakub Jelinek wrote: > On Tue, Jul 18, 2017 at 10:38:50AM +0200, Martin Liška wrote: >> 2017-06-27 Martin Liska >> >> PR sanitize/81186 > > 8 spaces instead of tab? > >> * function.c (expand_function_start): Set parm_birth_insn after >> static chain is

Re: [PATCH 2/2] Introduce Python testcases to check DWARF output

2017-07-27 Thread Pierre-Marie de Rodat
On 07/27/2017 10:36 AM, Richard Biener wrote: Given that gdb can decode dwarf and we rely on gdb for guality and gdb has python scripting can we somehow walk its dwarf tree from within a python script? That is, not need the dwarf decoding or objdump requirement? I’m quite familiar with GDB’s P

Re: [PATCH 1/2] Introduce testsuite support to run Python tests

2017-07-27 Thread Pierre-Marie de Rodat
On 07/27/2017 10:50 AM, Matthias Klose wrote: you are unconditionally hard coding python as the interpreter, which on most distributions points to 2.7. Please check python3 as well and make that the preferred interpreter if available. python 2.7 is now EOL'd for 2020. Understood, thank you. I’

[PATCH] Fix segfault in gcov.c (PR gcov-profile/81561).

2017-07-27 Thread Martin Liška
Hello. As reported in mentioned PR, we segfault in gcov tool when one uses -a. It's caused by fact that vectors blocks and block_lists have indices kept in sync and as one removes an element from blocks via: blocked.erase (it); Then calling recursively the same function breaks the synchroniz

Re: [PATCH] Bound partial-inlining-entry-probability param (PR ipa/80663).

2017-07-27 Thread Martin Liška
On 05/26/2017 10:54 AM, Richard Biener wrote: > On Thu, May 25, 2017 at 12:00 PM, Martin Liška wrote: >> Hello. >> >> Having value of parameter partial-inlining-entry-probability bigger than 100 >> does not >> make sense and can be just used to artificially trigger partial inlining. >> >> Patch c

[Committed] S/390: Fix PR81534

2017-07-27 Thread Andreas Krebbel
The HI/QI atomic_fetch_" expander accepted symbolic references and emitted CAS patterns whose insn predicates rejected them. Fixed by allowing symbolic references there as well. Reload will get rid of them due to the constraint letter. Regression tested on s390x. Committed to mainline and GCC 7

[PATCH] [RISCV] Add RTEMS support

2017-07-27 Thread Sebastian Huber
gcc/ * config.gcc (riscv*-*-elf*): Add (riscv*-*-rtems*). * config/riscv/rtems.h: New file. --- gcc/config.gcc | 7 ++- gcc/config/riscv/rtems.h | 31 +++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 gcc/config/risc

Re: [PATCH] Switch vec_init and vec_extract optabs to 2 mode optab to allow extraction of vector from vector or initialization of vector from smaller vectors (PR target/80846)

2017-07-27 Thread Segher Boessenkool
On Tue, Jul 25, 2017 at 11:14:32AM +0200, Jakub Jelinek wrote: > The following patch adjusts the vec_init and vec_extract optabs, so that > they don't have in the expander names just the vector mode, but also another > mode, for vec_extract the mode of the result and for vec_init the mode of > the

[Patch (preapproved)] Guard Copy Header pass on flag_tree_loop_vectorize

2017-07-27 Thread James Greenhalgh
Hi, While answering a user question on the equivalence of -ftree-loop-vectorize + -ftree-slp-vectorize and -ftree-vectorize I spotted one case which broke the equivalence. pass_ch::process_loop_p was guarded on flag_tree_vectorize, meaning you would get it for -ftree-vectorize, but not for -ftree

Re: [PATCH] Bound partial-inlining-entry-probability param (PR ipa/80663).

2017-07-27 Thread Jan Hubicka
> On 05/26/2017 10:54 AM, Richard Biener wrote: > > On Thu, May 25, 2017 at 12:00 PM, Martin Liška wrote: > >> Hello. > >> > >> Having value of parameter partial-inlining-entry-probability bigger than > >> 100 does not > >> make sense and can be just used to artificially trigger partial inlining.

Re: [PATCH] Fix segfault in gcov.c (PR gcov-profile/81561).

2017-07-27 Thread Richard Biener
On Thu, Jul 27, 2017 at 12:12 PM, Martin Liška wrote: > Hello. > > As reported in mentioned PR, we segfault in gcov tool when one uses -a. It's > caused by fact > that vectors blocks and block_lists have indices kept in sync and as one > removes an element > from blocks via: >blocked.erase (

Re: [Patch (preapproved)] Guard Copy Header pass on flag_tree_loop_vectorize

2017-07-27 Thread Richard Biener
On Thu, Jul 27, 2017 at 1:43 PM, James Greenhalgh wrote: > > Hi, > > While answering a user question on the equivalence of > -ftree-loop-vectorize + -ftree-slp-vectorize and -ftree-vectorize I > spotted one case which broke the equivalence. pass_ch::process_loop_p > was guarded on flag_tree_vector

Re: [PATCH] Switch vec_init and vec_extract optabs to 2 mode optab to allow extraction of vector from vector or initialization of vector from smaller vectors (PR target/80846)

2017-07-27 Thread Andreas Krebbel
On 07/25/2017 11:14 AM, Jakub Jelinek wrote: S/390 parts are ok. -Andreas-

[PATCH][1/n] Fix PR81502

2017-07-27 Thread Richard Biener
This fixes a part of PR81502 where we fail to re-write a variable into SSA because we don't know how to re-write a bit insertion into a BIT_INSERT_EXPR. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. Richard. 2017-07-27 Richard Biener PR tree-optimization/815

Re: [Patch (preapproved)] Guard Copy Header pass on flag_tree_loop_vectorize

2017-07-27 Thread Jakub Jelinek
On Thu, Jul 27, 2017 at 01:54:21PM +0200, Richard Biener wrote: > --- gcc/common.opt (revision 250619) > +++ gcc/common.opt (working copy) > ftree-vectorize > -Common Report Var(flag_tree_vectorize) Optimization > +Common Report Optimization > Enable vectorization on trees. > > ftree-

Re: Handle data dependence relations with different bases

2017-07-27 Thread Richard Sandiford
Richard Sandiford writes: > Eric Botcazou writes: >> [Sorry for missing the previous messages] >> >>> Thanks. Just been retesting, and I think I must have forgotten >>> to include Ada last time. It turns out that the patch causes a dg-scan >>> regression in gnat.dg/vect17.adb, because we now th

Re: [Patch (preapproved)] Guard Copy Header pass on flag_tree_loop_vectorize

2017-07-27 Thread Richard Biener
On Thu, Jul 27, 2017 at 2:08 PM, Jakub Jelinek wrote: > On Thu, Jul 27, 2017 at 01:54:21PM +0200, Richard Biener wrote: >> --- gcc/common.opt (revision 250619) >> +++ gcc/common.opt (working copy) >> ftree-vectorize >> -Common Report Var(flag_tree_vectorize) Optimization >> +Common Repo

[patch 0/2] PR49847: Add hook to place read-only lookup-tables in named address-space

2017-07-27 Thread Georg-Johann Lay
For some targets, the best place to put read-only lookup tables as generated by -ftree-switch-conversion is not the generic address space but some target specific address space. This is the case for AVR, where for most devices .rodata must be located in RAM. Part #1 adds a new, optional target h

Re: [patch 0/2] PR49847: Add hook to place read-only lookup-tables in named address-space

2017-07-27 Thread Richard Biener
On Thu, Jul 27, 2017 at 2:29 PM, Georg-Johann Lay wrote: > For some targets, the best place to put read-only lookup tables as > generated by -ftree-switch-conversion is not the generic address space > but some target specific address space. > > This is the case for AVR, where for most devices .rod

Re: [PATCH] Fix segfault in gcov.c (PR gcov-profile/81561).

2017-07-27 Thread Martin Liška
On 07/27/2017 01:48 PM, Richard Biener wrote: > On Thu, Jul 27, 2017 at 12:12 PM, Martin Liška wrote: >> Hello. >> >> As reported in mentioned PR, we segfault in gcov tool when one uses -a. It's >> caused by fact >> that vectors blocks and block_lists have indices kept in sync and as one >> remo

C++-ify vec_info structures

2017-07-27 Thread Richard Sandiford
[ Needed to unblock https://gcc.gnu.org/ml/gcc-patches/2017-07/msg00198.html ] This patch uses new, delete, constructors and desctructors to manage vec_info. This includes making ~vec_info free all the data shared by bb_vec_info and loop_vec_info, whereas previously the code was duplicated in des

Re: [patch 1/2] PR49847: Add hook to place read-only lookup-tables in named address-space

2017-07-27 Thread Georg-Johann Lay
On 27.07.2017 14:29, Georg-Johann Lay wrote: For some targets, the best place to put read-only lookup tables as generated by -ftree-switch-conversion is not the generic address space but some target specific address space. This is the case for AVR, where for most devices .rodata must be located

Re: [7/7] Pool alignment information for common bases

2017-07-27 Thread Richard Sandiford
Richard Biener writes: > On Tue, Jul 4, 2017 at 2:01 PM, Richard Sandiford > wrote: >> Richard Biener writes: >>> On Mon, Jul 3, 2017 at 9:49 AM, Richard Sandiford >>> wrote: @@ -2070,8 +2143,7 @@ vect_find_same_alignment_drs (struct dat if (dra == drb) return;

Re: [patch 2/2,avr] PR49847: Add hook to place read-only lookup-tables in named address-space

2017-07-27 Thread Georg-Johann Lay
On 27.07.2017 14:29, Georg-Johann Lay wrote: For some targets, the best place to put read-only lookup tables as generated by -ftree-switch-conversion is not the generic address space but some target specific address space. This is the case for AVR, where for most devices .rodata must be located

Re: [PATCH] Initialize counters in autoFDO to zero, not to uninitialized.

2017-07-27 Thread Martin Liška
On 07/26/2017 07:43 PM, Jeff Law wrote: > On 07/11/2017 04:35 AM, Martin Liška wrote: >> Hello. >> >> This fixes majority of autoFDO test-cases. >> >> Patch can boostrap and survives regression tests. >> >> Ready for trunk? >> Thanks, >> Martin >> >> gcc/ChangeLog: >> >> 2017-07-11 Martin Liska

Re: [PATCH] Fix indirect call optimization done by autoFDO.

2017-07-27 Thread Martin Liška
On 07/26/2017 07:22 PM, Jeff Law wrote: > So is the comment wrong? Or is my interpretation wrong? > > jeff Yes, comment needs adjustment, done that in r250622. Thanks for review, Martin

Re: [PATCH] Make __FUNCTION__ a mergeable string and do not generate symbol entry.

2017-07-27 Thread Martin Liška
PING^1 On 07/14/2017 10:35 AM, Martin Liška wrote: > On 05/01/2017 09:13 PM, Jason Merrill wrote: >> On Wed, Apr 26, 2017 at 6:58 AM, Martin Liška wrote: >>> On 04/25/2017 01:58 PM, Jakub Jelinek wrote: On Tue, Apr 25, 2017 at 01:48:05PM +0200, Martin Liška wrote: > Hello. > > Th

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

2017-07-27 Thread Martin Liška
PING^1 On 07/13/2017 03:48 PM, Martin Liška wrote: > On 07/11/2017 05:52 PM, Jason Merrill wrote: >> On Tue, Jul 11, 2017 at 9:37 AM, Martin Liška wrote: >>> On 07/03/2017 11:00 PM, Jason Merrill wrote: On Mon, Jul 3, 2017 at 5:52 AM, Martin Liška wrote: > On 06/30/2017 09:34 PM, Jason

Re: [PATCH v2] [SPARC] Add -mfsmuld option

2017-07-27 Thread Eric Botcazou
> Thanks for your quick review. I am really glad that we can now use the > upcoming GCC 7.2 release. You"re welcome. I just realized that FSMULD would pop up out of nowhere in the log displayed by -mdebug=options so I have installed the attached fixlet. 2017-07-27 Eric Botcazou * c

Re: [patch 0/2] PR49847: Add hook to place read-only lookup-tables in named address-space

2017-07-27 Thread Georg-Johann Lay
On 27.07.2017 14:34, Richard Biener wrote: On Thu, Jul 27, 2017 at 2:29 PM, Georg-Johann Lay wrote: For some targets, the best place to put read-only lookup tables as generated by -ftree-switch-conversion is not the generic address space but some target specific address space. This is the case

Re: [PATCH 1/2] Introduce testsuite support to run Python tests

2017-07-27 Thread David Malcolm
On Thu, 2017-07-27 at 10:49 +0200, Pierre-Marie de Rodat wrote: > On 07/26/2017 06:48 PM, David Malcolm wrote: > > IIRC RHEL 6 has Python 2.6 as its /usr/bin/python (but Python 2.7 > > is > > available as a "software collection" add-on). > > > > I don't know if gcc as a project would want to suppo

[PATCH] Fix PR81573

2017-07-27 Thread Richard Biener
The following fixes PR81573. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2017-07-27 Richard Biener PR tree-optimization/81573 PR tree-optimization/81494 * tree-vect-loop.c (vect_create_epilog_for_reduction): Handle multi defuse cycl

[PATCH] Fix PR81571

2017-07-27 Thread Richard Biener
The following fixes PR81571. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2017-07-27 Richard Biener PR tree-optimization/81571 * tree-vect-slp.c (vect_build_slp_tree): Properly verify reduction PHIs. * gcc.dg/torture/pr81571.c: New

[PATCH][2/2] Fix PR81502

2017-07-27 Thread Richard Biener
I am testing the following additional pattern for match.pd to fix PR81502 resulting in the desired optimization to bar: .LFB526: .cfi_startproc movl%edi, %eax ret the pattern optimizes a BIT_FIELD_REF on a BIT_INSERT_EXPR by either extracting from the destination or t

Re: [PATCH] Fix PR middle-end/81564: ICE in group_case_labels_stmt()

2017-07-27 Thread Peter Bergner
On 7/27/17 2:48 AM, Richard Biener wrote: > On Wed, Jul 26, 2017 at 9:35 PM, Peter Bergner wrote: >> The fix here is to just treat case labels that point to blocks that have >> already been deleted similarly to case labels that point to the default >> case statement, by removing them. >> >> This p

Re: [PATCH] [RISCV] Add RTEMS support

2017-07-27 Thread Kito Cheng
Hi Sebastian: LGTM, I've test riscv32-rtems-gcc is buildable. Thanks for you patch :) Hi Palmer: Could you help to commit this patch ? Thanks. On Thu, Jul 27, 2017 at 7:05 PM, Sebastian Huber wrote: > gcc/ > * config.gcc (riscv*-*-elf*): Add (riscv*-*-rtems*). > * config/riscv/

Re: [Patch (preapproved)] Guard Copy Header pass on flag_tree_loop_vectorize

2017-07-27 Thread James Greenhalgh
On Thu, Jul 27, 2017 at 02:26:03PM +0200, Richard Biener wrote: > On Thu, Jul 27, 2017 at 2:08 PM, Jakub Jelinek wrote: > > On Thu, Jul 27, 2017 at 01:54:21PM +0200, Richard Biener wrote: > >> --- gcc/common.opt (revision 250619) > >> +++ gcc/common.opt (working copy) > >> ftree-vectori

[PATCH] Add -nolibc option

2017-07-27 Thread Tristan Gingold
Hello, this patch adds a new option -nolibc to supress -lc in the link command. This refines -nostdlib/-nostartfiles/nodefaultlibs, so that it is possible to link with libgcc but without libc. Our main use case is for embedded targets when we use the GNAT compiler without an installed libc.

[PATCH] Dump BB number when dumping a BB with label.

2017-07-27 Thread Martin Liška
Hi. Following simple patch adds support for dumping of BBs when it's a BB that contains a label. That makes it easier for debugging as one can find destination for an edge in dump file. Sample, before: foo (int a) { int D.1821; int _1; int _4; int _5; [0.00%] [count: INV]: switch (

Re: c-family PATCH to improve -Wsign-compare (PR c/81417)

2017-07-27 Thread Marek Polacek
On Tue, Jul 25, 2017 at 11:03:12AM -0400, David Malcolm wrote: > Thanks for updating the patch. > > There's still an issue with ordering in the updated patch. > > There are three orderings: > > (a) the order of the expressions in the source code (LHS CMP RHS) > > (b) the order of kinds of s

c-family PATCH to improve and simplify -Wmultistatement-macros (PR c/81448, c/81306)

2017-07-27 Thread Marek Polacek
To recap, -Wmultistatement-macros warns for code like #define FOO y++; z++ if (i) FOO; if FOO expands to multiple statements not wrapped in {}. It tracks the location of the guard (if), the location of the body of the conditional (y++) and the location of the following statement (z++).

Re: c-family PATCH to improve -Wsign-compare (PR c/81417)

2017-07-27 Thread David Malcolm
On Thu, 2017-07-27 at 16:42 +0200, Marek Polacek wrote: > On Tue, Jul 25, 2017 at 11:03:12AM -0400, David Malcolm wrote: > > Thanks for updating the patch. > > > > There's still an issue with ordering in the updated patch. > > > > There are three orderings: > > > > (a) the order of the express

[PATCH,AIX] Don't leak a file descriptor if an archive is malformed.

2017-07-27 Thread REIX, Tony
(Damned ! Brut text format required !!) Description: * This patch fixes a possible leak of a file descriptor if an archive is malformed. Tests: * Fedora25/x86_64 + GCC trunk : SUCCESS - gmake in libbacktrace directory * AIX : - gmake in libbacktrace directory ChangeLog: * xcoff.c: Don

RE:[PATCH,AIX] Don't leak a file descriptor if an archive is malformed.

2017-07-27 Thread REIX, Tony
Better with the patch file... Sorry. The Resend did not add the joint file I added with first message (in HTML format, refused). Hope it's OK now. Tony Index: libbacktrace/ChangeLog === --- libbacktrace/ChangeLog (revision 250609) +++

[PATCH 0/2] Force usage of LRA for all rs6000 port compiles.

2017-07-27 Thread Peter Bergner
In GCC 7, the rs6000 port made the switch to using LRA over reload by default. We kept the ability of using reload in case there was an LRA issue. We have squashed all known rs6000 specific LRA bugs and now is the time to remove the ability to use reload from GCC 8/rs6000. The first patch replac

Re: [PATCH][GCC][AArch64] optimize float immediate moves (1 /4) - infrastructure.

2017-07-27 Thread James Greenhalgh
On Wed, Jul 26, 2017 at 05:00:05PM +0100, Tamar Christina wrote: > Hi James, > > I have updated the patch and have responded to your question blow. > > Ok for trunk? Ok, with a few small changes. > > > static bool > > > @@ -5857,12 +5955,6 @@ aarch64_preferred_reload_class (rtx x, > > reg_clas

[PATCH 1/2] Eliminate -mno-lra from the rs6000 port.

2017-07-27 Thread Peter Bergner
This patch makes the -mlra option a nop while disallowing -mno-lra. It also removes the target bit mask and its usage. Finally, this patch updates the testsuite by removing all usage of the -mlra and -mno-lra options. This passed bootstrap and regtesting with no regressions, ok for trunk? Peter

[PATCH 2/2] Remove reload_in_progress and other cleanups.

2017-07-27 Thread Peter Bergner
This patch removes reload specific code from the rs6000 port made possible by the elimination of the usage of the -mno-lra option. This passed bootstrap and regtesting with no regressions, ok for trunk? Peter * config/rs6000/predicates.md (volatile_mem_operand) Remove code relate

Re: [patch 2/2,avr] PR49847: Add hook to place read-only lookup-tables in named address-space

2017-07-27 Thread Denis Chertykov
2017-07-27 16:50 GMT+04:00 Georg-Johann Lay : > On 27.07.2017 14:29, Georg-Johann Lay wrote: >> >> For some targets, the best place to put read-only lookup tables as >> generated by -ftree-switch-conversion is not the generic address space >> but some target specific address space. >> >> This is th

RE:[PATCH,AIX] Changes for linking gotools on AIX.

2017-07-27 Thread REIX, Tony
Hi Ian, David, On AIX, that is more complicated... We have to use -static-libgo when building the libgo tests. Because AIX does not work like Linux does and because the Go libgo tests are done by duplicating several .go files of libgo packages that already appear in the libgo.a (libgo.so) libr

Re: [PATCH][2/2] Fix PR81502

2017-07-27 Thread Andrew Pinski
On Thu, Jul 27, 2017 at 6:50 AM, Richard Biener wrote: > > I am testing the following additional pattern for match.pd to fix > PR81502 resulting in the desired optimization to > > bar: > .LFB526: > .cfi_startproc > movl%edi, %eax > ret > > the pattern optimizes a BIT_FI

Re: [PATCH][GCC][AArch64] optimize float immediate moves (2 /4) - HF/DF/SF mode.

2017-07-27 Thread James Greenhalgh
On Mon, Jun 26, 2017 at 11:50:51AM +0100, Tamar Christina wrote: > Hi all, > > Here's the re-spun patch. > Aside from the grouping of the split patterns it now also uses h register for > the fmov for HF when available, > otherwise it forces a literal load. > > Regression tested on aarch64-none-l

Re: [PATCH][AArch64] Fix missing optimization for CMP+AND

2017-07-27 Thread James Greenhalgh
On Wed, Mar 29, 2017 at 11:17:20AM +0100, Sudi Das wrote: > > Hi all > > During combine GCC tries to merge CMP (with zero) and AND into a TST. > However, in cases where an ANDS operand is not compatible, this was being > missed. Adding a define_split where this operand was moved to a register > s

Re: [PATCH 1/2] Eliminate -mno-lra from the rs6000 port.

2017-07-27 Thread Segher Boessenkool
Hi! On Thu, Jul 27, 2017 at 10:43:44AM -0500, Peter Bergner wrote: > This patch makes the -mlra option a nop while disallowing -mno-lra. > It also removes the target bit mask and its usage. > Finally, this patch updates the testsuite by removing all usage of > the -mlra and -mno-lra options. So y

Re: [PATCH] Improve alloca alignment

2017-07-27 Thread Jeff Law
On 07/26/2017 05:29 PM, Wilco Dijkstra wrote: > Jeff Law wrote: > >> + if (required_align > MAX_SUPPORTED_STACK_ALIGNMENT) >> +{ >> + extra = (required_align - MAX_SUPPORTED_STACK_ALIGNMENT) >> + / BITS_PER_UNIT; >> + size = plus_constant (Pmode, size, extra); >> + size = f

Re: [PATCH] [RISCV] Add RTEMS support

2017-07-27 Thread Palmer Dabbelt
It appears to work for me: I can generate a simple no-op executable and link it with multilib. I don't know anything about RTEMS, so I'm just going to trust it'll actually work :). We're not going to have bandwidth to test this, but if you're interested there's some support for running the GCC te

Re: [PATCH] Fix PR middle-end/81564: ICE in group_case_labels_stmt()

2017-07-27 Thread Steven Bosscher
On Wed, Jul 26, 2017 at 9:35 PM, Peter Bergner wrote: > The test case for PR81564 exposes an issue where the case labels for a > switch statement point to blocks that have already been removed by an > earlier call to cleanup_tree_cfg(). In that case, the code in > group_case_labels_stmt() that doe

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

2017-07-27 Thread James Greenhalgh
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 this and the first version was: > > + [(set_attr "type" "neon_bsl,neon_bsl,neon_bsl,multiple") > +

Re: [Mechanical Patch ARM/AArch64 1/2] Rename load/store scheduling types to encode data size

2017-07-27 Thread James Greenhalgh
On Wed, Jun 21, 2017 at 11:49:47AM +0100, James Greenhalgh wrote: > On Mon, Jun 12, 2017 at 03:28:52PM +0100, Kyrill Tkachov wrote: *ping ^2* Thanks, James > > > > On 12/06/17 14:53, James Greenhalgh wrote: > > >Hi, > > > > > >In the AArch64 backend and scheduling models there is some confusio

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

2017-07-27 Thread James Greenhalgh
On Mon, Jul 03, 2017 at 11:46:58AM +0100, James Greenhalgh wrote: > On Wed, Jun 21, 2017 at 11:50:08AM +0100, James Greenhalgh wrote: > > *ping* > > Ping*2 Ping*3 Thanks, James > > Thanks, > James > > > On Mon, Jun 12, 2017 at 02:54:00PM +0100, James Greenhalgh wrote: > > > > > > Hi, > > >

  1   2   >