[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
> 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

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

[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 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

[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 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

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 > >

[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 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

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

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

[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 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 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 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 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 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 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 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 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

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

[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

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

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

<    1   2