Re: [PATCH] Fix profiledbootstrap - store-merging aliasing issue (PR bootstrap/82916)

2017-11-09 Thread Richard Biener
On Thu, 9 Nov 2017, Jakub Jelinek wrote: > Hi! > > We want to terminate a chain if a chain with different base (or insn > outside of any chain) has a store that the current stmt might use, or > overwrite. The functions it used didn't cover the store after store > case which in the middle-end ali

Drop frequencies from cgraph edges

2017-11-09 Thread Jan Hubicka
Hi, this patch completes the removal of frequencies by dropping them from callgraph edges. The callgraph node and edge counts are now just copies of BB counts (node count is ENTRY_BLOCK_PTR count and edge count is the count of corresponding stmt). These counts can be local and any IPA comparsions

[C++ PATCH] Remove the null check from placement new in all modes

2017-11-09 Thread Ville Voutilainen
Tested manually on Linux-X64, finishing testing with the full suite on Linux-PPC64. I spent far too much time contemplating whether to add a compatibility switch for this, but -fcheck-new *is* such a compatibility switch. OK for trunk? 2017-11-10 Ville Voutilainen gcc/ Remove the nu

Re: [PATCH] [GOLD] Add plugin API for processing plugin-added input files

2017-11-09 Thread Cary Coutant
> include/ChangeLog: > 2017-11-09 Stephen Crane > > * plugin-api.h: Add new plugin hook to allow processing of input > files added by a plugin. > (ld_plugin_new_input_handler): New funcion hook type. > (ld_plugin_register_new_input): New interface. > (LDPT

[SFN+LVU+IEPM v4 9/9] [IEPM] Introduce inline entry point markers

2017-11-09 Thread Alexandre Oliva
Output DW_AT_entry_pc based on markers. Introduce DW_AT_GNU_entry_view as a DWARF extension. If views are enabled are we're not in strict compliance mode, output DW_AT_GNU_entry_view if it might be nonzero. This patch depends on SFN and LVU patchsets, and on the IEPM patch that introduces the in

[SFN+LVU+IEPM v4 7/9] [LVU] Introduce location views

2017-11-09 Thread Alexandre Oliva
This patch introduces an option to enable the generation of location views along with location lists. The exact format depends on the DWARF version: it can be a separate attribute (DW_AT_GNU_locviews) or (DW_LLE_view_pair) entries in DWARF5+ loclists. Line number tables are also affected. If the

[SFN+LVU+IEPM v4 8/9] [IEPM] Introduce debug hook for inline entry point markers

2017-11-09 Thread Alexandre Oliva
The inline_entry hook will be given a definition in a later patch. for gcc/ChangeLog * debug.h (gcc_debug_hooks): Add inline_entry. * dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Likewise. * debug.c (do_nothing_debug_hooks): Likewise. * vmsdbgout.c (vmsdbg_debug

[SFN+LVU+IEPM v4 6/9] [SFN] Introduce -gstatement-frontiers option, enable debug markers

2017-11-09 Thread Alexandre Oliva
Introduce a command line option to enable statement frontiers, enabled by default in optimized builds with DWARF2+ debug information. This patch depends on an earlier patch that completed the infrastructure for debug markers, and on another patch that turns -g into a negatable option prefix. gcc/

[SFN+LVU+IEPM v4 5/9] [SFN] introduce statement frontier notes, still disabled

2017-11-09 Thread Alexandre Oliva
This patch completes the infrastructure for the introduction of statement frontiers in C-family languages. It brings in all the code remaining code needed to introduce and transform begin stmt trees, gimple stmts, insns and notes, and ultimately use them to generate the is_stmt column in DWARF2+ l

[SFN+LVU+IEPM v4 3/9] [SFN] not-quite-boilerplate changes in preparation to introduce nonbind markers

2017-11-09 Thread Alexandre Oliva
This patch adjusts numerous parts of the compiler that would malfunction should they find debug markers at points where they may be introduced. The changes purport to allow the compiler to pass bootstrap-debug-lean (-fcompare-debug in stage3) at various optimization levels, as well as bootstrap-de

[SFN+LVU+IEPM v4 4/9] [SFN] stabilize find_bb_boundaries

2017-11-09 Thread Alexandre Oliva
If find_bb_boundaries is given a block with zero or one nondebug insn beside debug insns, it shouldn't purge dead edges, because without debug insns we wouldn't purge them at that point. Doing so may change the order in which edges are processed, and ultimately lead to different transformations to

[SFN+LVU+IEPM v4 2/9] [SFN] boilerplate changes in preparation to introduce nonbind markers

2017-11-09 Thread Alexandre Oliva
This patch introduces a number of new macros and functions that will be used to distinguish between different kinds of debug stmts, insns and notes, namely, preexisting debug bind ones and to-be-introduced nonbind markers. In a seemingly mechanical way, it adjusts several uses of the macros and fu

[SFN+LVU+IEPM v4 1/9] [SFN] adjust RTL insn-walking API

2017-11-09 Thread Alexandre Oliva
This patch removes unused RTL functions, introduces alternate ones for use in a later SFN patch, and regroups other related functions so that they appear in a more consistent order. for gcc/ChangeLog * emit-rtl.c (next_nondebug_insn, prev_nondebug_insn): Reorder. (next_nonnote_no

SFN+LVU+IEPM v4 (was: Re: Statement Frontier Notes, Location Views, and Inlined Entry Point Markers)

2017-11-09 Thread Alexandre Oliva
On Sep 30, 2017, Alexandre Oliva wrote: > On Aug 31, 2017, Alexandre Oliva wrote: >> On Aug 23, 2017, Richard Biener wrote: >>> Just separating the boilerplate changes out from the "meat" of the change >>> into a separate patch for easier reviewing would be nice. >> I've broken up the patch in

Re: [PATCH] [GOLD] Add plugin API for processing plugin-added input files

2017-11-09 Thread Stephen Crane
Cary Coutant writes: > The patch for include/plugin-api.h needs to be separated out (with a > ChangeLog entry of its own), and applied first to the GCC tree, then > synced to binutils. After that, the rest of this patch is OK to apply. Thanks. Attached is the patch for plugin-api.h which needs t

Re: [PATCH 9/9] [IEPM] Introduce inline entry point markers

2017-11-09 Thread Alexandre Oliva
On Nov 9, 2017, Jeff Law wrote: >> I didn't want yet another rtl code that would have to be added to >> cases all over; the distinction between markers matters at only very >> few points in the compiler. > Is it fair to say one is just a variant of the other? I don't see them that way, but the

[RFA][PATCH] 2/n Refactoring tree-vrp.c -- pull evrp bits into their own file

2017-11-09 Thread Jeff Law
This patch pulls out the EVRP class & methods from tree-vrp.c. It's a straight copy-n-paste with the exception of the evrp_folder class which I trimmed back down to its minimal form. This obviously forces shared structures/routines between tree-vrp.c and tree-evrp.c to get exposed in a header fil

Re: [PATCH] enhance -Warray-bounds to detect out-of-bounds offsets (PR 82455)

2017-11-09 Thread Jeff Law
On 11/02/2017 05:48 AM, Richard Biener wrote: > > There were elaborate transforms of ptr + CST to ptr->a.b.c[3] in the > past. We have ripped out _most_ of them because of bad interaction > with dependence analysis and _b_o_s warnings. > > But for example PRE might still end up propagating > >

Re: [PATCH 3/4] enhance overflow and truncation detection in strncpy and strncat (PR 81117)

2017-11-09 Thread Jeff Law
On 11/09/2017 04:44 PM, Martin Sebor wrote: > Attached is another update to the patch with the above.  While > going through it again I noticed a couple of opportunities to > handle ranges so I added those as well.  I have retested the > patch with GDB and Glibc.  They both require minor changes a

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

2017-11-09 Thread Martin Sebor
Ping: https://gcc.gnu.org/ml/gcc-patches/2017-10/msg01642.html On 10/23/2017 08:42 PM, Martin Sebor wrote: Attached is a reworked solution to enhance -Wrestrict while avoiding changing tree-vrp.c or any other VRP machinery. Richard, in considering you suggestions I realized that the ao_ref s

Re: [PATCH 3/4] enhance overflow and truncation detection in strncpy and strncat (PR 81117)

2017-11-09 Thread Martin Sebor
On 11/03/2017 09:49 PM, Jeff Law wrote: On 10/20/2017 06:18 PM, Martin Sebor wrote: What might be even better would be to use the immediate uses of the memory tag. For your case there should be only one immediate use and it should point to the statement which NUL terminates the destination. O

[PATCH, rs6000 V2] Add Power 9 support for vec_first builtins

2017-11-09 Thread Carl Love
GCC Maintainers: The following is an updated patch to add support for the vec_first_match_index, vec_first_match_or_eos_index, vec_first_mismatch_index, and vec_first_mismatch_or_eos_index builtins for ISA 3.0. I have addressed the comments from Segher and Jakub. The patch has been re-tested on:

Re: [PATCH] Fix compare-elim.c ICE (PR rtl-optimization/82913)

2017-11-09 Thread Eric Botcazou
> Anyway, this patch doesn't do those smarts, just restores previous behavior. > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? > > 2017-11-09 Jakub Jelinek > > PR rtl-optimization/82913 > * compare-elim.c (try_merge_compare): Punt if def_insn is not > s

Re: [patch] Fix EH breakage in LTO mode

2017-11-09 Thread Eric Botcazou
> Hmm, I am still not following. By EH-neutral you mean function compiled > with -fno-exceptions so it has no unwind info at all or one that has unwind > info but does not do anything with EH? OK, I see what you mean now. So, even if lto_init_eh is never invoked and thus never sets flag_exceptio

[committed[PATCH] Refactoring tree-vrp, step one introducing vr_values

2017-11-09 Thread Jeff Law
And the big part of the patch. Only changes were two conceptual chunks were committed earlier, one member function name change and removal of unnecessary vertical whitespace in a class definition. Committing to the trunk. Posting for archival purposes. jeff commit dcd9367d22b6f49fe4fca8d6a412c

Re: [patch] Fix EH breakage in LTO mode

2017-11-09 Thread Eric Botcazou
> this is PR lto/81351. Totally missed it... Do not hesitate to CC me for SPARC regressions. -- Eric Botcazou

[committed][PATCH] Move classes to earlier point in file

2017-11-09 Thread Jeff Law
This was broken out of the first tree-vrp refactoring patch. This patch just moves two classes to earlier points in the file. Richi approved this as part of the larger patch. But since I had it pulled out, I'm going to commit it individually. I'm posting the patch here for archival purposes.

[committed][PATCH] Avoid references to vrp_equiv_obstack

2017-11-09 Thread Jeff Law
This was broken out of the first tree-vrp refactoring patch. This patch avoids a couple references to vrp_equiv_obstack. This makes the subsequent refactoring work easier. Richi approved this as part of the larger patch. But since I had it pulled out, I'm going to commit it individually. I'm

Re: [PING][patch] PR81794: have "would be stringified in traditional C" warning in libcpp/macro.c be controlled by -Wtraditional

2017-11-09 Thread Eric Gallager
Ping again: https://gcc.gnu.org/ml/gcc-patches/2017-11/msg00123.html On 11/2/17, Eric Gallager wrote: > Ping: https://gcc.gnu.org/ml/gcc-patches/2017-10/msg01834.html > > On 10/25/17, Eric Gallager wrote: >> On Sat, Sep 30, 2017 at 8:05 PM, Eric Gallager >> wrote: >>> On Fri, Sep 29, 2017 at 11

[PATCH] PR fortran/78240 -- kludge of the day

2017-11-09 Thread Steve Kargl
The following patch fixes PR fortran/78240. It seems to me to be inelegant, but it does pass regression testing. The kludgy portion occurs in decl.c. march_clist_expr is clearly expecting an array with constant dimension due to gcc_assert. When -fdec is used and one takes Gerhard code (see testc

libgo patch committed: Don't assume that reads from address 0 crash

2017-11-09 Thread Ian Lance Taylor
This libgo patch from Tony Reix fixes libgo on AIX, where reads from address 0 simply return 0 rather than crashing with a segmentation violation. The libgo code was expecting the latter, which caused some tests to fail. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to main

[PATCH], PR middle_end/82333, Make long double/_Float128 constants not hash to the same value on the PowerPC

2017-11-09 Thread Michael Meissner
This patch fixes PR middle_end/82333. The bug is due to compare_constant thinking two floating point constants are the same if the floating point size and the internal value are the same. On the PowerPC, long double and _Float128 both are 128-bits, but they have different internal representations

std::advance istreambuf_iterator overload

2017-11-09 Thread François Dumont
Hi     Working on istreambuf_iterator I realized that this iterator would really benefit from an std::advance overload so here it is.     Tested under Linux x86_64 normal and debug modes, ok to commit ? François diff --git a/libstdc++-v3/include/bits/streambuf_iterator.h b/libstdc++-v3/inclu

[PATCH] Fix profiledbootstrap - store-merging aliasing issue (PR bootstrap/82916)

2017-11-09 Thread Jakub Jelinek
Hi! We want to terminate a chain if a chain with different base (or insn outside of any chain) has a store that the current stmt might use, or overwrite. The functions it used didn't cover the store after store case which in the middle-end aliasing model needs to avoid tbaa, because the latter st

[PATCH] Fix compare-elim.c ICE (PR rtl-optimization/82913)

2017-11-09 Thread Jakub Jelinek
Hi! My recent changes to compare-elim.c introduced ICE on the following testcase. When computing cmp->in_a_setter, I've made sure it is single_set and therefore I've left the if (!set) return false; stuff out. That usually works, but doesn't if an earlier try_eliminate_compare or try_merge_compare

Re: [patch] Fix EH breakage in LTO mode

2017-11-09 Thread Richard Biener
On November 9, 2017 7:03:18 PM GMT+01:00, Jan Hubicka wrote: >> > I am not sure I follow your argumentation here. flag_exceptions is >> > optimization which means that one should not test it globally. For >that >> > reason I would just change dwarf2out to simply trigger >> > dwarf2out_frame_finis

Re: C++ runtime library selection via -stdlib=libstdc++/libc++ (WIP)

2017-11-09 Thread René J . V . Bertin
On Thursday November 09 2017 17:41:39 Joseph Myers wrote: >Your __APPLE__ conditional would appear to condition something on whether >the *host* is an Apple system. If you wish to change the default for Evidently. As I said, there are a number of settings that will (probably) need to be deter

Re: [PATCH] 1/n Refactoring tree-vrp.c, step one introducing vr_values class

2017-11-09 Thread Jeff Law
On 11/09/2017 11:12 AM, Martin Sebor wrote: > On 11/07/2017 02:03 PM, Jeff Law wrote: >> So this is the first step in pulling apart tree-vrp.c.  As outlined in >> an earlier message the goal of this patch is just to get the vr_values >> class introduced.  I've tried (and mostly succeeded) in avoidi

[PATCH,committed] Fix PR fortran/78814

2017-11-09 Thread Steve Kargl
Here's another small, obvious fix where a pointer was not to see that it was non-NULL. Committed after regression testing on x86_64-*-freebsd. 2017-11-09 Steven G. Kargl PR fortran/78814 * interface.c (symbol_rank): Check for NULL pointer. 2017-11-09 Steven G. Kargl

Re: [PATCH, GCC/testsuite] Fix retrieval of testname

2017-11-09 Thread Mike Stump
On Nov 9, 2017, at 10:00 AM, Thomas Preudhomme wrote: > > When gcc-dg-runtest is used to run a test the test is run several times > with different options. For clarity of the log, the test infrastructure > then append the options to the testname. This means that all the code > that must deal wit

Re: [PATCH] 1/n Refactoring tree-vrp.c, step one introducing vr_values class

2017-11-09 Thread Jeff Law
On 11/09/2017 08:24 AM, Richard Biener wrote: > On Wed, Nov 8, 2017 at 1:53 PM, Trevor Saunders wrote: >> On Tue, Nov 07, 2017 at 02:03:19PM -0700, Jeff Law wrote: >>> So this is the first step in pulling apart tree-vrp.c. As outlined in >>> an earlier message the goal of this patch is just to ge

Re: [PATCH] 1/n Refactoring tree-vrp.c, step one introducing vr_values class

2017-11-09 Thread Martin Sebor
On 11/07/2017 02:03 PM, Jeff Law wrote: So this is the first step in pulling apart tree-vrp.c. As outlined in an earlier message the goal of this patch is just to get the vr_values class introduced. I've tried (and mostly succeeded) in avoiding doing significant cleanups/rewrites at this point

[PATCH] Remove obsolete ECOFF support.

2017-11-09 Thread Jim Wilson
While looking at the collect2 COFF support, I noticed that there were two uses of EXTENDED_COFF which is for the obsolete ECOFF support. The last define for EXTENDED_COFF was removed 2012-03-14, so these uses are obsolete and can be removed. Tested with Power AIX C/C++ bootstrap and make check, a

Re: [patch] Fix EH breakage in LTO mode

2017-11-09 Thread Jan Hubicka
> > I am not sure I follow your argumentation here. flag_exceptions is > > optimization which means that one should not test it globally. For that > > reason I would just change dwarf2out to simply trigger > > dwarf2out_frame_finish if any of the compiled functions needed it (had > > flag_exceptio

[PATCH, GCC/testsuite] Fix retrieval of testname

2017-11-09 Thread Thomas Preudhomme
When gcc-dg-runtest is used to run a test the test is run several times with different options. For clarity of the log, the test infrastructure then append the options to the testname. This means that all the code that must deal with the testcase itself (eg. removing the output files after the tes

Re: [patch] Fix EH breakage in LTO mode

2017-11-09 Thread Rainer Orth
Hi Eric, > the patch > > 2017-07-06 Jan Hubicka > > * lto-wrapper.c (merge_and_complain): Do not merge > fexceptions, fnon_call_exceptions, ftrapv, ffp_contract_, fmath_errno, > fsigned_zeros, ftrapping_math, fwrapv. > (append_compiler_options): Do not track these option

Re: C++ runtime library selection via -stdlib=libstdc++/libc++ (WIP)

2017-11-09 Thread Joseph Myers
Your __APPLE__ conditional would appear to condition something on whether the *host* is an Apple system. If you wish to change the default for Apple systems, presumably that should be a matter of whether the *target* is an Apple system. (In general we want to avoid host conditionals as much a

Re: [001/nnn] poly_int: add poly-int.h

2017-11-09 Thread Martin Sebor
On 11/09/2017 04:06 AM, Richard Sandiford wrote: Martin Sebor writes: On 11/08/2017 11:28 AM, Richard Sandiford wrote: Martin Sebor writes: On 11/08/2017 09:51 AM, Richard Sandiford wrote: Martin Sebor writes: On 11/08/2017 02:32 AM, Richard Sandiford wrote: Martin Sebor writes: I have

C++ runtime library selection via -stdlib=libstdc++/libc++ (WIP)

2017-11-09 Thread René J . V . Bertin
Hi, A while back I filed a feature request for a build option to use the libc++ runtime, with a mostly PoC patch attached. Such a feature would increase GCC's usability on platforms like Apple's OS for Mac, but possibly on FreeBSD too. (And if it's technically possible to use Microsoft's runtim

Re: [patch] Fix EH breakage in LTO mode

2017-11-09 Thread Eric Botcazou
> I am not sure I follow your argumentation here. flag_exceptions is > optimization which means that one should not test it globally. For that > reason I would just change dwarf2out to simply trigger > dwarf2out_frame_finish if any of the compiled functions needed it (had > flag_exceptions set).

Re: [patch] Fix EH breakage in LTO mode

2017-11-09 Thread Jan Hubicka
> Hi, > > the patch > > 2017-07-06 Jan Hubicka > > * lto-wrapper.c (merge_and_complain): Do not merge > fexceptions, fnon_call_exceptions, ftrapv, ffp_contract_, fmath_errno, > fsigned_zeros, ftrapping_math, fwrapv. > (append_compiler_options): Do not track these optio

Re: [patch] Fix EH breakage in LTO mode

2017-11-09 Thread Richard Biener
On November 9, 2017 5:11:39 PM GMT+01:00, Eric Botcazou wrote: >Hi, > >the patch > >2017-07-06 Jan Hubicka > > * lto-wrapper.c (merge_and_complain): Do not merge > fexceptions, fnon_call_exceptions, ftrapv, ffp_contract_, fmath_errno, > fsigned_zeros, ftrapping_math, fwrapv.

[PATCH, rs6000 V4] Fixes for commit 254464

2017-11-09 Thread Carl Love
GCC Maintainers: The recent commit 254464 to add Power 8 support for the vec_revb() builtin had a couple of issues that I missed on my testing of the original patch. First, on Power 8 BE the le_swap1 permute vector value was wrong in function swap_endian_selector_for_mode(). This issue caused th

Cleanup bb-reorder after conversion to profile-counts

2017-11-09 Thread Jan Hubicka
Hi, this patch cleans up bb reorder pass after conversion to profile counts. All the duplicated logic between frequencies and counts can go. Bootstrapped/regtested x86_64-linux, will commit it shortly. Honza * bb-reorder.c (max_entry_frequency): Remove. (find_traces, rotate_loop,

[patch] Fix EH breakage in LTO mode

2017-11-09 Thread Eric Botcazou
Hi, the patch 2017-07-06 Jan Hubicka * lto-wrapper.c (merge_and_complain): Do not merge fexceptions, fnon_call_exceptions, ftrapv, ffp_contract_, fmath_errno, fsigned_zeros, ftrapping_math, fwrapv. (append_compiler_options): Do not track these options.

Re: [PATCH 9/9] [IEPM] Introduce inline entry point markers

2017-11-09 Thread Jeff Law
On 11/01/2017 12:35 PM, Alexandre Oliva wrote: > On Oct 31, 2017, Jeff Law wrote: > >>> @@ -5691,6 +5691,15 @@ expand_gimple_basic_block (basic_block bb, bool >>> disable_tail_calls) >>> goto delink_debug_stmt; >>> else if (gimple_debug_begin_stmt_p (stmt)) >>> val = gen_rtx_DEBUG_MARKER (VOIDmo

[PATCH] GCOV: do not support unexecuted blocks in Ada

2017-11-09 Thread Nathan Sidwell
+ /* support for unexecuted basic blocks */ comment is not a sentence. + unsigned support_unexecuted_blocks = gcov_read_unsigned (); + if (!support_unexecuted_blocks) +printf ("%s: has_unexecuted_block is not supported\n", filename); otherwise Ok. Just fix that formatting and commi

Re: Adjust empty class parameter passing ABI (PR c++/60336)

2017-11-09 Thread Richard Biener
On Thu, 9 Nov 2017, Marek Polacek wrote: > On Wed, Nov 08, 2017 at 09:06:51AM +0100, Richard Biener wrote: > > > >> >> > + if (TREE_CODE (field) == FIELD_DECL > > > >> >> > + && (DECL_NAME (field) > > > >> >> > + || RECORD_OR_UNION_TYPE_P (TREE_TYPE (field))) > > > >> >> > + && !de

Re: [PATCH] 1/n Refactoring tree-vrp.c, step one introducing vr_values class

2017-11-09 Thread Richard Biener
On Wed, Nov 8, 2017 at 1:53 PM, Trevor Saunders wrote: > On Tue, Nov 07, 2017 at 02:03:19PM -0700, Jeff Law wrote: >> So this is the first step in pulling apart tree-vrp.c. As outlined in >> an earlier message the goal of this patch is just to get the vr_values >> class introduced. I've tried (a

[PATCH] GCOV: create one intermediate file per a gcno file (PR gcov-profile/82702).

2017-11-09 Thread Nathan Sidwell
https://gcc.gnu.org/ml/gcc-patches/2017-10/msg02337.html sorry for dropping this one. looks good, except: - for (; argno != argc; argno++) + if (flag_intermediate_format) { - if (flag_display_progress) - printf ("Processing file %d out of %d\n", argno - first_arg + 1, -

Re: Adjust empty class parameter passing ABI (PR c++/60336)

2017-11-09 Thread Marek Polacek
On Wed, Nov 08, 2017 at 09:06:51AM +0100, Richard Biener wrote: > > >> >> > + if (TREE_CODE (field) == FIELD_DECL > > >> >> > + && (DECL_NAME (field) > > >> >> > + || RECORD_OR_UNION_TYPE_P (TREE_TYPE (field))) > > >> >> > + && !default_is_empty_type (TREE_TYPE (field))) > > >> >> >

Re: [PATCH 7/7] GCOV: remove typedef of coverage_t.

2017-11-09 Thread Nathan Sidwell
On 11/09/2017 05:24 AM, marxin wrote: gcc/ChangeLog: 2017-11-09 Martin Liska * gcov.c (struct coverage_info): Remove typedef of coverage_t. (struct source_info): Likewise. (add_branch_counts): Likewise. (add_line_counts): Likewise. (function_summary):

Re: [PATCH 6/7] GCOV: remove typedef for block_t

2017-11-09 Thread Nathan Sidwell
On 11/09/2017 05:24 AM, marxin wrote: gcc/ChangeLog: 2017-11-09 Martin Liska * gcov.c (struct block_info): Remove typedef for block_t. (struct line_info): Likewise. (line_info::has_block): Likewise. (EXIT_BLOCK): Likewise. (unblock): Likewise.

Re: [PATCH] Fix up store_merging_13.c FAIL

2017-11-09 Thread Richard Biener
On Thu, 9 Nov 2017, Jakub Jelinek wrote: > Hi! > > The gcc.dg/store_merging_13.c testcase worked when I was bootstrapping the > patch that introduced it, but doesn't anymore, because match.pd had > a ~X ^ Y -> ~(X ^ Y) transformation, the code was handling only ~ on > the loads (== arguments of &

Re: [PATCH 5/7] GCOV: remove typedef for arc_t

2017-11-09 Thread Nathan Sidwell
On 11/09/2017 05:24 AM, marxin wrote: gcc/ChangeLog: 2017-11-09 Martin Liska * gcov.c (struct arc_info): Remove typedef for arc_t. (struct line_info): Likewise. (add_branch_counts): Likewise. (output_branch_count): Likewise. (function_info::~function_i

Re: [PATCH 4/7] GCOV: remove typedef for function_t

2017-11-09 Thread Nathan Sidwell
On 11/09/2017 05:24 AM, marxin wrote: gcc/ChangeLog: 2017-11-09 Martin Liska * gcov.c (struct function_info): Remove typedef for function_t. (struct source_info): Likewise. (source_info::get_functions_at_location): Likewise. (solve_flow_graph): Likewise.

Re: [PATCH 3/7] GCOV: introduce vector for function_info::counts.

2017-11-09 Thread Nathan Sidwell
On 11/09/2017 05:24 AM, marxin wrote: gcc/ChangeLog: 2017-11-09 Martin Liska * gcov.c (function_info::function_info): Remove num_counts and add vector. (function_info::~function_info): Use the vector. (process_file): Likewise. (read_graph_file): Likewi

Re: [PATCH 2/7] GCOV: simplify usage of function_info::artificial.

2017-11-09 Thread Nathan Sidwell
On 11/09/2017 05:24 AM, marxin wrote: gcc/ChangeLog: 2017-11-09 Martin Liska * gcov.c (is_artificial): New function. (process_file): Erase all artificial early. (generate_results): Skip as all artificial are already removed. --- gcc/gcov.c | 66 +

Re: [PATCH 1/7] GCOV: introduce global vector of functions

2017-11-09 Thread Nathan Sidwell
On 11/09/2017 05:24 AM, marxin wrote: gcc/ChangeLog: 2017-11-09 Martin Liska * gcov.c (read_graph_file): Store to global vector of functions. (read_count_file): Iterate the vector. (process_file): Likewise. (generate_results): Likewise. (release_struct

Re: [PATCH 1/2] Moving parameter manipulation into its own file

2017-11-09 Thread Jan Hubicka
Dne 2017-11-08 21:54, Martin Jambor napsal: Hi, the following patch moves all function and call parameter manipulation (as opposed to analysis) data structures and functions from ipa-prop.h and ipa-prop.c to new files ipa-param-manipulation.h and ipa-param-manipulation.c respectively. It does n

Re: [GCC-6.4][ARM][PATCH v2] enable FL_LPAE flag for armv7ve cores

2017-11-09 Thread Kyrill Tkachov
On 08/11/17 19:21, Andre McCurdy wrote: The following commit added the FL_LPAE flag to FL_FOR_ARCH7VE, but neglected to also add it to the armv7ve compatible cores defined in arm-cores.def. https://github.com/gcc-mirror/gcc/commit/af2d9b9e58e8be576c53d94f30c48c68146b0c98 The result is that gcc

Re: [PATCH, GCC/ARM] Fix cmse_nonsecure_entry return insn size

2017-11-09 Thread Kyrill Tkachov
Hi Thomas, On 08/11/17 09:50, Thomas Preudhomme wrote: Hi, A number of instructions are output in assembler form by output_return_instruction () when compiling a function with the cmse_nonsecure_entry attribute for Armv8-M Mainline with hardfloat float ABI. However, the corresponding thumb2_cms

Re: [PATCH] Fix up store_merging_13.c FAIL

2017-11-09 Thread Marc Glisse
On Thu, 9 Nov 2017, Jakub Jelinek wrote: The gcc.dg/store_merging_13.c testcase worked when I was bootstrapping the patch that introduced it, but doesn't anymore, because match.pd had a ~X ^ Y -> ~(X ^ Y) transformation, the code was handling only ~ on the loads (== arguments of &/|/^) but not o

Handle more SLP constant and extern definitions for variable VF

2017-11-09 Thread Richard Sandiford
This patch adds support for vectorising SLP definitions that are constant or external (i.e. from outside the loop) when the vectorisation factor isn't known at compile time. It can only handle cases where the number of SLP statements is a power of 2. Tested on aarch64-linux-gnu (with and without

[Ada] Variable reads and writes

2017-11-09 Thread Pierre-Marie de Rodat
This patch adds processing for N_Variable_Reference_Marker nodes to the transformation phase of gigi. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-11-09 Hristian Kirtchev * gcc-interface/trans.c (gnat_to_gnu): Add processing for N_Variable_Reference_Marker nodes. In

Fix mismatched profile type

2017-11-09 Thread Jan Hubicka
Hi, the testcase triggers yet another case where we do not update profile type correctly when inter-proceduraly inlining because of 0 in the entry_block_ptr count. Bootstrapped/regtested x86_64-linux, will commit it shortly. Honza * ipa-inline-transform.c (update_noncloned_frequencies):

[PATCH], Enable fminf and fmaxf

2017-11-09 Thread Michael Meissner
In my previous patch enabling some of the built-in functions for _Float and _FloatX datatypes, I missed making fminf128 and fmaxf128 generate the minimum and maximum inline code when -ffast-math is used. This patch to match.pd enables the code generation using if-then-else if the machine does not

Re: [PATCH 21/22] Add extra field to gtm_jmpbuf on x86 only

2017-11-09 Thread H.J. Lu
On Wed, Nov 8, 2017 at 2:57 PM, H.J. Lu wrote: > On Wed, Nov 8, 2017 at 2:26 PM, Tsimbalist, Igor V > wrote: >>> -Original Message- >>> From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches- >>> ow...@gcc.gnu.org] On Behalf Of Jeff Law >>> Sent: Wednesday, November 8, 2017 7:31 PM >>> T

Add optabs for common types of permutation

2017-11-09 Thread Richard Sandiford
...so that we can use them for variable-length vectors. For now constant-length vectors continue to use VEC_PERM_EXPR and the vec_perm_const optab even for cases that the new optabs could handle. The vector optabs are inconsistent about whether there should be an underscore before the mode part o

[Ada] Export Make_Independent from GNAT.Threads

2017-11-09 Thread Pierre-Marie de Rodat
This patch exports Make_Independent from GNAT.Threads. No simple test available. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-11-09 Bob Duff * libgnarl/g-thread.ads, libgnarl/g-thread.adb: (Make_Independent): Export this so users can use it without importing

[Ada] Fix bootstrap issue with CodePeer justifications

2017-11-09 Thread Pierre-Marie de Rodat
The use of pragma Annotate to justify CodePeer messages breaks compiler bootstrap. Fix this by removing these justifications. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-11-09 Yannick Moy * erroutc.adb, set_targ.adb: Remove pragma Annotate for CodePeer justification

[Ada] Quadratic explosion caused by freezing of contracts

2017-11-09 Thread Pierre-Marie de Rodat
This patch reimplements the "freezing of contracts" semantic because it caused a quadratic exlosion in the number of subprogram bodies in declarative lists. The "freezing of constracts" semantic is carried out when an entry, package, protected, subprogram [stub], or task body is processed. Prior t

[Ada] Crash on use of Compile_Time_Error in a generic package

2017-11-09 Thread Pierre-Marie de Rodat
An expanded name used within a generic package declaration must be handled specially because the prefix may denote a parent unit that will have a different name in an instance. We introduce a renaming of the generic unit and replace the expanded name with a reference to that renaming, The renaming

[Ada] Bump size limit for large static aggregates

2017-11-09 Thread Pierre-Marie de Rodat
For historical reasons, the compiler caps the size of large static aggregates that are emitted as static data in the object file. If they exceed the cap, then elaboration code is generated instead, but this is in most cases slower, yields bigger and unoptimizable code with poor run-time performanc

[PATCH] Fix up store_merging_13.c FAIL

2017-11-09 Thread Jakub Jelinek
Hi! The gcc.dg/store_merging_13.c testcase worked when I was bootstrapping the patch that introduced it, but doesn't anymore, because match.pd had a ~X ^ Y -> ~(X ^ Y) transformation, the code was handling only ~ on the loads (== arguments of &/|/^) but not on the result of the bitwise binary oper

Re: [PATCH] Replace has_single_use guards in store-merging

2017-11-09 Thread Richard Biener
On Wed, 8 Nov 2017, Jakub Jelinek wrote: > On Wed, Nov 08, 2017 at 04:20:15PM +0100, Richard Biener wrote: > > Can't you simply use > > > >unsigned ret = 0; > >FOR_EACH_SSA_TREE_OPERAND (op, stmt, iter, SSA_OP_USE) > > if (!has_single_use (op)) > >++ret; > >return ret; >

[Ada] Get rid of warnings about uninitialized variables

2017-11-09 Thread Pierre-Marie de Rodat
This patch cleans up the code to get rid of warnings about uninitialized variables. No change in behavior; no test available. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-11-09 Bob Duff * exp_ch4.adb, exp_ch9.adb, exp_prag.adb, par-ch3.adb, sem_aggr.adb, sem_ch12.ad

[PATCH] Fix PR82902

2017-11-09 Thread Richard Biener
The following fixes PR82902. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2017-11-09 Richard Biener PR tree-optimization/82902 * tree-ssa-phiprop.c (propagate_with_phi): Test proper type. * g++.dg/torture/pr82902.C: New testcase. Index: gc

[Ada] Rewrite code and add justifications for static analysis

2017-11-09 Thread Pierre-Marie de Rodat
CodePeer static analyzer issues messages that can be avoided by simpliflying the code, or justifying the false positives. There is no test, as this does no impact the behavior of the compiler. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-11-09 Yannick Moy * erroutc.adb (Outp

[Ada] Fix code quality issues reported by CodePeer at level 3

2017-11-09 Thread Pierre-Marie de Rodat
Rerunning CodePeer at level 3 revealed further missing initializations (not errors, but good to add for maintenance and to improve analysis results) and missing No_Return pragmas. Now fixed. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-11-09 Yannick Moy * sem_attr.adb (Analy

[Ada] Restriction Static_Dispatch_Tables

2017-11-09 Thread Pierre-Marie de Rodat
This patch implements a new GNAT restriction named Static_Dispatch_Tables, which is intented to prevent the creation of tagged types whose dispatch tables cannot be placed in read-only memory. The following test now compiles with errors. pragma Restrictions (Static_Dispatch_Tables); procedure Te

[Ada] Spurious error on pragma Unreferenced

2017-11-09 Thread Pierre-Marie de Rodat
This patch suppresses the light expansion of references denoting renamings that act as arguments in pragmas Unmodified and Unreferenced for GNATprove. In general, the compiler replaces references to renamings with the renamed name, however certain references are left as is for GNATprove. This does

[Ada] Spurious error on read of out parameter in Ada_83 mode

2017-11-09 Thread Pierre-Marie de Rodat
This patch fixes a regression in the handling of out parameters that appear as the prefix of an attribute, when compiling in Ada_83 mode. Such implicit read operations are legal in Ada_83 when the parameter is of an array type and the attribute yields bound information. Tested on x86_64-pc-linux-g

[PATCH,doc] Fix latency in pipeline description example

2017-11-09 Thread Luis Machado
While reading through section 16.19.9 of the internals manual, i ran into this example that looked slightly odd: (define_insn_reservation "div" 8 (eq_attr "type" "div") "i1_pipeline, div*7, div + (port0 | port1)") Am i missing something or is this example incorrect and th

[Ada] Fix false positive of -gnatw.x on trivial instantiation

2017-11-09 Thread Pierre-Marie de Rodat
As for calls, issuing the -gnatw.x warning on every generic instantiation results in way too many false positives and thus needs to be stopped. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-11-09 Eric Botcazou * exp_ch11.adb (Possible_Local_Raise): Do not issue the warning fo

[Ada] Fix code quality issues reported by CodePeer

2017-11-09 Thread Pierre-Marie de Rodat
Running CodePeer on GNAT frontend codebase revealed a number of code quality issues. For the most part, these are not bugs, but could lead to bugs during maintenance. A few could lead to reads of uninitialized variables. This patch fixes these issues in various ways: - add initialization in cases

[Ada] Cleanup of Namet

2017-11-09 Thread Pierre-Marie de Rodat
CodePeer detected some questionable code in the Namet package. This patch cleans it up. No actual bugs, but some dead code was detected. The main impact of this patch is to clarify which subprogram parameters are allowed to be the special "null"-ish Name_Id values (almost none). No change in compil

[Ada] use_clauses sometimes ignored in generic template

2017-11-09 Thread Pierre-Marie de Rodat
This patch prevents spurious visibility errors due to use_clauses being ignored when analyzing entities within a generic instance's template. -- Source -- -- gnatcoll-json-support-test-test_vectors-integer_vectors-json.ads with GNATCOLL.JSON.Support.Ada.Containers.Vect

[Ada] Misleading error or crash on illegal call with limited view

2017-11-09 Thread Pierre-Marie de Rodat
This patch provides a proper diagnostic on an illegal call to a function whose return type is a limited view, when the call appears in a unit whose context does not include the non-limited view of the type. Prior to this patch the compiler reports a misleading error about a missing discriminant, or

[Ada] Crash on SPARK_Mode with illegal mode

2017-11-09 Thread Pierre-Marie de Rodat
This patch modifies the processing of aspect or pragma SPARK_Mode to avoid a crash when the annotation appears with an illegal mode. -- Source -- -- pack.ads package Pack is package Nested_1 with SPARK_Mode => False is end Nested_1; Obj : constant String := "

  1   2   >