Re: [PATCH 1/4] force decls to be allocated through build_decl to initialize them

2021-07-15 Thread Trevor Saunders
On Thu, Jul 15, 2021 at 10:01:01AM +0200, Richard Biener wrote: > On Thu, Jul 15, 2021 at 4:24 AM Trevor Saunders wrote: > > > > On Wed, Jul 14, 2021 at 01:27:54PM +0200, Richard Biener wrote: > > > On Wed, Jul 14, 2021 at 10:20 AM Trevor Saunders > >

[PATCH] add myself to DCO section

2021-07-14 Thread Trevor Saunders
fyi, in case I forget to sign off, all my commits this year forwards are under the DCO (as I do not have an assignment). Trev Signed-off-by: Trevor Saunders --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 48cfa3fda1d..7cb63e5f62b 100644

Re: [PATCH 1/4] force decls to be allocated through build_decl to initialize them

2021-07-14 Thread Trevor Saunders
On Wed, Jul 14, 2021 at 01:27:54PM +0200, Richard Biener wrote: > On Wed, Jul 14, 2021 at 10:20 AM Trevor Saunders > wrote: > > > > prior to this commit all calls to build_decl used input_location, even if > > temporarily until build_decl reset the lo

[PATCH 4/4] pass location to md_asm_adjust

2021-07-14 Thread Trevor Saunders
So the hook can use it as the location of diagnostics. bootstrapped and regtested on x86_64-linux-gnu, also tested one make all-gcc for each effected cpu, ok? Trev gcc/ChangeLog: * cfgexpand.c (expand_asm_loc): Adjust. (expand_asm_stmt): Likewise. *

[PATCH 3/4] use diagnostic location in diagnostic_report_current_function

2021-07-14 Thread Trevor Saunders
It appears that input_location was used here before the diagnostic's location was available, and never updated, when the other part of the header was added that uses it, so this makes it consistent. bootstrapped and regtested on x86_64-linux-gnu, ok? Trev gcc/ChangeLog: *

[PATCH 2/4] use error_at and warning_at in cfgexpand.c

2021-07-14 Thread Trevor Saunders
bootstrapped and regtested on x86_64-linux-gnu, ok? Trev gcc/ChangeLog: * cfgexpand.c (tree_conflicts_with_clobbers_p): Pass location to diagnostics. (expand_asm_stmt): Likewise. --- gcc/cfgexpand.c | 35 ++- 1 file changed, 18

[PATCH 1/4] force decls to be allocated through build_decl to initialize them

2021-07-14 Thread Trevor Saunders
prior to this commit all calls to build_decl used input_location, even if temporarily until build_decl reset the location to something else that it was told was the proper location. To avoid using the global we need the caller to pass in the location it wants, however that's not possible with

Re: [PATCH 2/4] allow poisoning input_location in ranges it should not be used

2021-07-02 Thread Trevor Saunders
On Fri, Jul 02, 2021 at 01:20:14PM -0600, Martin Sebor wrote: > On 6/29/21 11:35 PM, Trevor Saunders wrote: > > This makes it possible to assert if input_location is used during the > > lifetime > > of a scope. This will allow us to find places that currently use it withi

Re: [PATCH 2/4] allow poisoning input_location in ranges it should not be used

2021-07-02 Thread Trevor Saunders
On Fri, Jul 02, 2021 at 11:46:46AM -0400, Jason Merrill wrote: > On 7/1/21 6:16 AM, Trevor Saunders wrote: > > On Wed, Jun 30, 2021 at 11:13:23AM -0400, David Malcolm wrote: > > > On Wed, 2021-06-30 at 01:35 -0400, Trevor Saunders wrote: > > > > This makes it possib

Re: [PATCH 2/4] allow poisoning input_location in ranges it should not be used

2021-07-01 Thread Trevor Saunders
On Thu, Jul 01, 2021 at 11:40:55AM -0400, David Malcolm via Gcc-patches wrote: > On Thu, 2021-07-01 at 14:53 +0200, Richard Biener wrote: > > On Thu, Jul 1, 2021 at 12:16 PM Trevor Saunders < > > tbsau...@tbsaunde.org> wrote: > > > > > > On Wed, Jun 30,

Re: [PATCH 2/4] allow poisoning input_location in ranges it should not be used

2021-07-01 Thread Trevor Saunders
On Wed, Jun 30, 2021 at 09:09:33PM +0200, Richard Biener wrote: > On June 30, 2021 2:33:30 PM GMT+02:00, Trevor Saunders > wrote: > >On Wed, Jun 30, 2021 at 11:00:37AM +0200, Richard Biener wrote: > >> On Wed, Jun 30, 2021 at 7:37 AM Trevor Saunders > > wrot

Re: [PATCH 2/4] allow poisoning input_location in ranges it should not be used

2021-07-01 Thread Trevor Saunders
On Wed, Jun 30, 2021 at 11:13:23AM -0400, David Malcolm wrote: > On Wed, 2021-06-30 at 01:35 -0400, Trevor Saunders wrote: > > This makes it possible to assert if input_location is used during the > > lifetime > > of a scope.  This will allow us to find places that curren

Re: [PATCH 2/4] allow poisoning input_location in ranges it should not be used

2021-06-30 Thread Trevor Saunders
On Wed, Jun 30, 2021 at 11:00:37AM +0200, Richard Biener wrote: > On Wed, Jun 30, 2021 at 7:37 AM Trevor Saunders wrote: > > > > This makes it possible to assert if input_location is used during the > > lifetime > > of a scope. This will allow us to find places t

[PATCH 4/4] poison input_location and cfun in one spot

2021-06-29 Thread Trevor Saunders
This simply confirms we can poison them in a small region. boostrapped and regtested on x86_64-linux-gnu, ok? Trev gcc/ChangeLog: * gimple-range.cc (disable_ranger): Prevent access to cfun and input_location. --- gcc/gimple-range.cc | 3 +++ 1 file changed, 3 insertions(+)

[PATCH 2/4] allow poisoning input_location in ranges it should not be used

2021-06-29 Thread Trevor Saunders
This makes it possible to assert if input_location is used during the lifetime of a scope. This will allow us to find places that currently use it within a function and its callees, or prevent adding uses within the lifetime of a function after all existing uses are removed. bootstrapped and

[PATCH 3/4] allow poisoning cfun

2021-06-29 Thread Trevor Saunders
Since cfun is already a macro in most of the compiler, we redefine it to point to a second variable, to avoid having to support C++ objects as GC roots. However we keep the existing function * global for internal use as a gc root. It is unfortunate the two globals need to stay in sync, but there

[PATCH 1/4] add utility to poison globals that should not be used

2021-06-29 Thread Trevor Saunders
This provides a class to wrap globals like input_location or cfun that should not be used directly and will ideally go away. This class tracks if access to the global is currently blocked and asserts if accessed when that is not allowed. It also adds a class to mark access as blocked for the

Re: [PATCH] define auto_vec copy ctor and assignment (PR 90904)

2021-06-29 Thread Trevor Saunders
On Fri, Jun 25, 2021 at 02:51:58PM -0600, Martin Sebor via Gcc-patches wrote: > On 6/1/21 3:38 PM, Jason Merrill wrote: > > On 6/1/21 3:56 PM, Martin Sebor wrote: > > > On 5/27/21 2:53 PM, Jason Merrill wrote: > > > > On 4/27/21 11:52 AM, Martin Sebor via Gcc-patches wrote: > > > > > On 4/27/21

Re: [PATCH 5/6] make get_domminated_by_region return a auto_vec

2021-06-28 Thread Trevor Saunders
On Wed, Jun 23, 2021 at 05:43:32PM -0600, Martin Sebor wrote: > On 6/22/21 11:23 PM, Trevor Saunders wrote: > > On Tue, Jun 22, 2021 at 02:01:24PM -0600, Martin Sebor wrote: > > > On 6/21/21 1:15 AM, Richard Biener wrote: > > > > On Fri, Jun 18, 2021

Re: [PATCH 5/6] make get_domminated_by_region return a auto_vec

2021-06-22 Thread Trevor Saunders
On 6/16/21 6:46 AM, Richard Sandiford via Gcc-patches wrote: > > > > > > > > Richard Biener via Gcc-patches writes: > > > > > > > > > On Tue, Jun 15, 2021 at 8:02 AM Trevor Saunders > > > > > > > >

Re: [PATCH 3/6] return auto_vec from get_loop_hot_path

2021-06-17 Thread Trevor Saunders
On Thu, Jun 17, 2021 at 03:48:28PM +0200, Christophe Lyon wrote: > On Tue, 15 Jun 2021 at 08:47, Richard Biener via Gcc-patches > wrote: > > > > On Tue, Jun 15, 2021 at 8:01 AM Trevor Saunders > > wrote: > > > > > > This ensures callers take ownership

Re: [PATCH 5/6] make get_domminated_by_region return a auto_vec

2021-06-17 Thread Trevor Saunders
On Thu, Jun 17, 2021 at 08:03:53AM +0200, Richard Biener wrote: > On Wed, Jun 16, 2021 at 6:01 PM Martin Sebor wrote: > > > > On 6/16/21 6:46 AM, Richard Sandiford via Gcc-patches wrote: > > > Richard Biener via Gcc-patches writes: > > >> On Tue, Jun

Re: [PATCH 4/6] return auto_vec from get_dominated_by

2021-06-17 Thread Trevor Saunders
On Wed, Jun 16, 2021 at 07:45:01AM +0200, Bernhard Reutner-Fischer wrote: > On 16 June 2021 05:09:17 CEST, Trevor Saunders wrote: > > >> I'm curious why you keep the release() above and ... > > > >There was no particular reason, I just didn't make a very complete &

Re: [PATCH 1/6] auto_vec copy/move improvements

2021-06-15 Thread Trevor Saunders
On Tue, Jun 15, 2021 at 10:18:30AM -0600, Martin Sebor wrote: > On 6/14/21 11:59 PM, Trevor Saunders wrote: > > - Unfortunately using_auto_storage () needs to handle m_vec being null. > > - Handle self move of an auto_vec to itself. > > - punt on defining copy or move o

[PATCH, V2] auto_vec copy/move improvements

2021-06-15 Thread Trevor Saunders
expenssive coppies of the vector and makes it clear when coppies are needed that that is what is intended. When it is necessary to copy a vector copy () can be used. Signed-off-by: Trevor Saunders This time without the changes to the inline storage version of auto_vec as requested. bootstrap

Re: [PATCH 4/6] return auto_vec from get_dominated_by

2021-06-15 Thread Trevor Saunders
On Tue, Jun 15, 2021 at 01:18:54PM +0200, Bernhard Reutner-Fischer wrote: > On 15 June 2021 08:46:57 CEST, Richard Biener via Gcc-patches > wrote: > >On Tue, Jun 15, 2021 at 8:02 AM Trevor Saunders > >wrote: > >> > >> Signed-off-by: Trevor Saunders

Re: [PATCH 1/6] auto_vec copy/move improvements

2021-06-15 Thread Trevor Saunders
On Tue, Jun 15, 2021 at 09:11:52AM +0200, Richard Biener wrote: > On Tue, Jun 15, 2021 at 9:04 AM Trevor Saunders wrote: > > > > On Tue, Jun 15, 2021 at 08:42:35AM +0200, Richard Biener wrote: > > > On Tue, Jun 15, 2021 at 8:00 AM Trevor Saunders > > > wrote

Re: [PATCH 1/6] auto_vec copy/move improvements

2021-06-15 Thread Trevor Saunders
On Tue, Jun 15, 2021 at 08:42:35AM +0200, Richard Biener wrote: > On Tue, Jun 15, 2021 at 8:00 AM Trevor Saunders wrote: > > > > - Unfortunately using_auto_storage () needs to handle m_vec being null. > > - Handle self move of an auto_vec to itself. > > - punt on defi

[PATCH 6/6] return auto_vec from more dominance functions

2021-06-15 Thread Trevor Saunders
This ensures the vector gets cleaned up by the caller when appropriate. Signed-off-by: Trevor Saunders bootstrapped and regtested on x86_64-linux-gnu, ok? gcc/ChangeLog: * dominance.c (get_dominated_to_depth): Return auto_vec. * dominance.h (get_dominated_to_depth): Likewise

[PATCH 5/6] make get_domminated_by_region return a auto_vec

2021-06-15 Thread Trevor Saunders
This makes it clear the caller owns the vector, and ensures it is cleaned up. Signed-off-by: Trevor Saunders bootstrapped and regtested on x86_64-linux-gnu, ok? gcc/ChangeLog: * dominance.c (get_dominated_by_region): Return auto_vec. * dominance.h (get_dominated_by_region

[PATCH 4/6] return auto_vec from get_dominated_by

2021-06-15 Thread Trevor Saunders
Signed-off-by: Trevor Saunders bootstrapped and regtested on x86_64-linux-gnu, ok? gcc/ChangeLog: * dominance.c (get_dominated_by): Return auto_vec. * dominance.h (get_dominated_by): Likewise. * auto-profile.c (afdo_find_equiv_class): Adjust. * cfgloopmanip.c

[PATCH 3/6] return auto_vec from get_loop_hot_path

2021-06-15 Thread Trevor Saunders
This ensures callers take ownership of the returned vector. Signed-off-by: Trevor Saunders bootstrapped and regtested on x86_64-linux-gnu, ok? gcc/ChangeLog: * cfgloop.h (get_loop_hot_path): Return auto_vec. * cfgloopanal.c (get_loop_hot_path): Likewise. * tree-ssa

[PATCH 2/6] return auto_vec from cgraph_node::collect_callers

2021-06-15 Thread Trevor Saunders
This ensures the callers of collect_callers () take ownership of the vector and free it when appropriate. Signed-off-by: Trevor Saunders bootstrapped and regtested on x86_64-linux-gnu, ok? gcc/ChangeLog: * cgraph.c (cgraph_node::collect_callers): Return auto_vec

[PATCH 1/6] auto_vec copy/move improvements

2021-06-14 Thread Trevor Saunders
a vector copy () can be used. Signed-off-by: Trevor Saunders bootstrapped and regtested on x86_64-linux-gnu, ok? gcc/ChangeLog: * vec.h (vl_ptr>::using_auto_storage): Handle null m_vec. (auto_vec::auto_vec): Define move constructor, and delete copy construc

[PATCH, pushed] use range based for loops to iterate over vec<>

2021-06-13 Thread Trevor Saunders
the index variables should have been deleted as part of the change. Signed-off-by: Trevor Saunders gcc/analyzer/ChangeLog: * call-string.cc (call_string::call_string): Use range based for to iterate over vec<>. (call_string::to_json): Likewise. (call_string

Re: [PATCH] Use range based loops to iterate over vec<> in various places

2021-06-09 Thread Trevor Saunders
On Wed, Jun 09, 2021 at 01:06:44PM +0200, Richard Biener wrote: > On Wed, Jun 9, 2021 at 2:48 AM Trevor Saunders wrote: > > > > Hello, > > > > This makes things a good bit shorter, and reduces complexity by removing > > a bunch of index variables. > > &

[PATCH] Use range based loops to iterate over vec<> in various places

2021-06-08 Thread Trevor Saunders
constant_expr): Likewise. * decl.c (wrapup_namespace_globals): Likewise. (cp_finish_decl): Likewise. (cxx_simulate_enum_decl): Likewise. * parser.c (cp_parser_postfix_expression): Likewise. Signed-off-by: Trevor Saunders --- gcc/analyzer/call-string.cc| 18 ++--- gcc/

Re: [PATCH] define auto_vec copy ctor and assignment (PR 90904)

2021-06-07 Thread Trevor Saunders
On Mon, Jun 07, 2021 at 02:34:26PM -0600, Martin Sebor wrote: > On 6/7/21 2:51 AM, Richard Biener wrote: > > On Thu, Jun 3, 2021 at 10:29 AM Trevor Saunders > > wrote: > > > > > > On Wed, Jun 02, 2021 at 10:04:03AM -0600, Martin Sebor via Gcc-patches > &

Re: [PATCH] define auto_vec copy ctor and assignment (PR 90904)

2021-06-07 Thread Trevor Saunders
On Mon, Jun 07, 2021 at 04:17:09PM -0600, Martin Sebor wrote: > On 6/3/21 2:29 AM, Trevor Saunders wrote: > > On Wed, Jun 02, 2021 at 10:04:03AM -0600, Martin Sebor via Gcc-patches > > wrote: > > > On 6/2/21 12:55 AM, Richard Biener wrote: > > > > On Tue,

Re: [PATCH] define auto_vec copy ctor and assignment (PR 90904)

2021-06-07 Thread Trevor Saunders
On Mon, Jun 07, 2021 at 10:51:18AM +0200, Richard Biener via Gcc-patches wrote: > On Thu, Jun 3, 2021 at 10:29 AM Trevor Saunders wrote: > > > > On Wed, Jun 02, 2021 at 10:04:03AM -0600, Martin Sebor via Gcc-patches > > wrote: > > > On 6/2/21 12:55 AM, Richard Biene

Re: [PATCH] define auto_vec copy ctor and assignment (PR 90904)

2021-06-03 Thread Trevor Saunders
On Wed, Jun 02, 2021 at 10:04:03AM -0600, Martin Sebor via Gcc-patches wrote: > On 6/2/21 12:55 AM, Richard Biener wrote: > > On Tue, Jun 1, 2021 at 9:56 PM Martin Sebor wrote: > > > > > > On 5/27/21 2:53 PM, Jason Merrill wrote: > > > > On 4/27/21 11:52 AM, Martin Sebor via Gcc-patches wrote: >

Re: hash-table violation in gcc/fortran/trans-decl.c

2018-10-31 Thread Trevor Saunders
On Tue, Oct 30, 2018 at 11:07:16AM +0100, Martin Li??ka wrote: > On 10/29/18 12:04 PM, Martin Li??ka wrote: > > 2) gfc_find_module > > > > $ ./xgcc -B. > > /home/marxin/Programming/gcc/gcc/testsuite/gfortran.dg/coarray/alloc_comp_2.f90 > > -fcoarray=single -fchecking=3 > > hash table checking

Re: [PATCH][RFC] Make iterating over hash-map elide copying/destructing

2018-07-11 Thread Trevor Saunders
On Tue, Jul 10, 2018 at 11:46:54AM +0200, Richard Biener wrote: > On Tue, 10 Jul 2018, Trevor Saunders wrote: > > > On Tue, Jul 10, 2018 at 10:43:20AM +0200, Richard Biener wrote: > > > > > > The following makes the hash-map iterator dereference return a pair

Re: [PATCH][RFC] Make iterating over hash-map elide copying/destructing

2018-07-10 Thread Trevor Saunders
On Tue, Jul 10, 2018 at 10:43:20AM +0200, Richard Biener wrote: > > The following makes the hash-map iterator dereference return a pair Value&> rather than a copy of Value. This matches the hash-table iterator > behavior and avoids issues with > > hash_map > Eventually somebodies probably

Re: [PATCH 01/10] Convert dump and optgroup flags to enums

2018-06-05 Thread Trevor Saunders
On Fri, Jun 01, 2018 at 12:00:09PM +0200, Richard Biener wrote: > On Tue, May 29, 2018 at 10:32 PM David Malcolm wrote: > > > > The dump machinery uses "int" in a few places, for two different > > sets of bitmasks. > > > > This patch makes things more self-documenting and type-safe by using > > a

Re: RFA: Sanitize deprecation messages (PR 84195)

2018-02-16 Thread Trevor Saunders
On Thu, Feb 15, 2018 at 04:04:45PM -0500, David Malcolm wrote: > On Fri, 2018-02-09 at 13:01 +, Nick Clifton wrote: > > +class escaped_string > > +{ > > + public: > > + escaped_string () { m_owned = false; m_str = NULL; }; > > + ~escaped_string () { if (m_owned) free (m_str); } > > +

Re: [RFC][PATCH] Extend DCE to remove unnecessary new/delete-pairs

2017-12-04 Thread Trevor Saunders
On Wed, Nov 29, 2017 at 08:56:44AM -0700, Martin Sebor wrote: > On 11/29/2017 01:30 AM, Jakub Jelinek wrote: > > On Tue, Nov 28, 2017 at 09:11:00PM -0700, Martin Sebor wrote: > > > On 11/27/2017 02:22 AM, Dominik Inführ wrote: > > > > Thanks for all the reviews! I’ve revised the patch, the > > >

Re: [PATCH 02/14] Support for adding and stripping location_t wrapper nodes

2017-11-14 Thread Trevor Saunders
On Fri, Nov 10, 2017 at 04:45:17PM -0500, David Malcolm wrote: > This patch provides a mechanism in tree.c for adding a wrapper node > for expressing a location_t, for those nodes for which > !CAN_HAVE_LOCATION_P, along with a new method of cp_expr. > > It's called in later patches in the kit via

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

2017-11-08 Thread Trevor Saunders
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 (and mostly succeeded) in avoiding doing > significant

Re: [09/nn] Add a fixed_size_mode_pod class

2017-11-01 Thread Trevor Saunders
On Wed, Nov 01, 2017 at 10:30:29AM -0600, Jeff Law wrote: > On 10/31/2017 08:47 PM, Trevor Saunders wrote: > > On Tue, Oct 31, 2017 at 11:38:48AM -0600, Jeff Law wrote: > > > On 10/31/2017 11:22 AM, Eric Botcazou wrote: > > > > > I don't see a reason not to other t

Re: [09/nn] Add a fixed_size_mode_pod class

2017-10-31 Thread Trevor Saunders
On Tue, Oct 31, 2017 at 11:38:48AM -0600, Jeff Law wrote: > On 10/31/2017 11:22 AM, Eric Botcazou wrote: > >> I don't see a reason not to other than a pretty small amount of work > >> each time we make a release. > > > > I'm not sure it would be so small an amount of work, especially on > >

Re: [09/nn] Add a fixed_size_mode_pod class

2017-10-31 Thread Trevor Saunders
On Mon, Oct 30, 2017 at 11:11:12AM +0100, Eric Botcazou wrote: > > It sounds like people are mostly concerned about sun studio and xlc? It > > doesn't seem that hard to provide precompiled binaries for those two > > platforms, and maybe 4.8 binaries for people who want to compile theire > > own

Re: [006/nnn] poly_int: tree constants

2017-10-29 Thread Trevor Saunders
On Sun, Oct 29, 2017 at 10:25:38AM -0600, Martin Sebor wrote: > On 10/27/2017 02:08 AM, Richard Sandiford wrote: > > Martin Sebor writes: > > > On 10/26/2017 11:52 AM, Richard Sandiford wrote: > > > > Martin Sebor writes: > > > > > For offset_int the default

Re: [09/nn] Add a fixed_size_mode_pod class

2017-10-29 Thread Trevor Saunders
On Thu, Oct 26, 2017 at 09:37:31PM +0200, Eric Botcazou wrote: > > Can you figure what oldest GCC release supports the C++11/14 POD handling > > that would be required? > > GCC needs to be buildable by other compilers than itself though. It sounds like people are mostly concerned about sun

Re: [RFA][PATCH] Provide a class interface into substitute_and_fold.

2017-10-29 Thread Trevor Saunders
On Wed, Oct 25, 2017 at 11:20:38AM -0600, Jeff Law wrote: > On 10/24/2017 03:45 PM, Jeff Law wrote: > > On 10/24/2017 02:57 PM, David Malcolm wrote: > >> On Tue, 2017-10-24 at 12:44 -0600, Jeff Law wrote: > >>> This is similar to the introduction of the ssa_propagate_engine, but > >>> for > >>>

Re: [committed][PATCH] Convert sprintf warning code to a dominator walk

2017-10-29 Thread Trevor Saunders
On Fri, Oct 27, 2017 at 02:03:59PM -0400, David Malcolm wrote: > On Fri, 2017-10-27 at 10:55 -0600, Jeff Law wrote: > > Prereq for eventually embedding range analysis into the sprintf > > warning > > pass. The only thing that changed since the original from a few days > > ago was the addition of

Re: [PATCH 1/2] add unique_ptr header

2017-10-12 Thread Trevor Saunders
On Wed, Oct 11, 2017 at 02:16:38PM -0400, David Malcolm wrote: > On Sat, 2017-08-05 at 01:39 -0400, Trevor Saunders wrote: > > On Fri, Aug 04, 2017 at 08:55:50PM +0100, Jonathan Wakely wrote: > > > On 01/08/17 23:09 -0400, Trevor Saunders wrote: > > > > aiui C++03

Re: [committed][PATCH] Simplify relationals into simple equality conditionals in DOM

2017-10-02 Thread Trevor Saunders
On Sun, Oct 01, 2017 at 09:22:56AM -0600, Jeff Law wrote: > > A short while ago Martin Liska posted a patch that lowered certain > switch statements into cascading conditionals. > > His work tripped two regressions in the testsuite, both cases where we > did not optimize as well as we should

Re: [PATCH 0/2] add unique_ptr class

2017-09-02 Thread Trevor Saunders
HI, figured I'd ping this to see if we can come to some concensus, I don't care much what we choose as a namespace, I just want to get this in so we can use it more. On Fri, Aug 11, 2017 at 09:43:21PM +0100, Jonathan Wakely wrote: > On 05/08/17 20:05 +0100, Pedro Alves wrote: > > On 08/04/2017

Re: [PATCH 00/22] RFC: integrated 3rd-party static analysis support

2017-09-01 Thread Trevor Saunders
On Fri, Sep 01, 2017 at 11:46:41AM -0600, Jeff Law wrote: > On 08/04/2017 04:04 PM, David Malcolm wrote: > > This patch kit clearly isn't ready yet as-is (see e.g. the > > "known unknowns" below), but I'm posting it now in the hope of > > getting early feedback. > [ ... ] > > > > > > >

Re: backwards threader cleanups

2017-09-01 Thread Trevor Saunders
On Fri, Sep 01, 2017 at 04:18:20PM -0400, Aldy Hernandez wrote: > Hi. > > Attached are misc cleanups to tree-ssa-threadbackwards.c and friends. > The main gist of the patch is making the path vectors live in the > heap, not GC. But I also cleaned up some comments to reflect reality, > and

Re: [PATCH 1/2] add unique_ptr header

2017-08-04 Thread Trevor Saunders
On Fri, Aug 04, 2017 at 08:55:50PM +0100, Jonathan Wakely wrote: > On 01/08/17 23:09 -0400, Trevor Saunders wrote: > > aiui C++03 is C++98 with a few additions to the stl. > > Again, STL != C++ Standard Library. > > C++03 made some important changes to the core language, par

Re: [PATCH 0/2] add unique_ptr class

2017-08-04 Thread Trevor Saunders
On Fri, Aug 04, 2017 at 07:52:18PM +0100, Jonathan Wakely wrote: > On 31/07/17 19:46 -0400, tbsaunde+...@tbsaunde.org wrote: > > I've been saying I'd do this for a long time, but I'm finally getting to > > importing the C++98 compatable unique_ptr class Pedro wrote for gdb a while > > back. I

Re: [PATCH 0/2] add unique_ptr class

2017-08-04 Thread Trevor Saunders
On Fri, Aug 04, 2017 at 04:43:32PM -0600, Martin Sebor wrote: > On 07/31/2017 05:46 PM, tbsaunde+...@tbsaunde.org wrote: > > From: Trevor Saunders <tbsaunde+...@tbsaunde.org> > > > > Hi, > > > > I've been saying I'd do this for a long time, but I'm fin

Re: [PATCH 1/2] add unique_ptr header

2017-08-01 Thread Trevor Saunders
On Tue, Aug 01, 2017 at 10:40:53AM -0400, David Malcolm wrote: > On Mon, 2017-07-31 at 19:46 -0400, tbsaunde+...@tbsaunde.org wrote: > > From: Trevor Saunders <tbsaunde+...@tbsaunde.org> > > > > For most of the history of this see > > https://sourceware.org/ml/

Re: [PATCH 0/3 v2] C/C++: show pertinent open token when missing a close token

2017-08-01 Thread Trevor Saunders
On Tue, Aug 01, 2017 at 04:21:41PM -0400, David Malcolm wrote: > On Wed, 2017-07-12 at 09:13 -0400, Trevor Saunders wrote: > > On Tue, Jul 11, 2017 at 11:24:45AM -0400, David Malcolm wrote: > > > + public: > > > + /* token_pair's ctor. */ > > > + token_pa

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

2017-07-31 Thread Trevor Saunders
On Mon, Jul 31, 2017 at 04:58:15PM -0600, Martin Sebor wrote: > On 07/31/2017 03:34 PM, Trevor Saunders wrote: > > On Mon, Jul 31, 2017 at 02:56:40PM -0600, Martin Sebor wrote: > > > On 07/27/2017 02:30 AM, tbsaunde+...@tbsaunde.org wrote: > > > > From: Trevor Saund

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

2017-07-31 Thread Trevor Saunders
On Mon, Jul 31, 2017 at 02:56:40PM -0600, Martin Sebor wrote: > On 07/27/2017 02:30 AM, tbsaunde+...@tbsaunde.org wrote: > > From: Trevor Saunders <tbsaunde+...@tbsaunde.org> > > > > The preC++ way of passing information about the call site of a function was > &g

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

2017-07-28 Thread Trevor Saunders
On Thu, Jul 27, 2017 at 10:43:09AM +0200, Richard Biener wrote: > On Thu, Jul 27, 2017 at 10:30 AM, <tbsaunde+...@tbsaunde.org> wrote: > > From: Trevor Saunders <tbsaunde+...@tbsaunde.org> > > > > The preC++ way of passing information about the call site of a fun

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

2017-07-28 Thread Trevor Saunders
On Fri, Jul 28, 2017 at 06:31:05PM +0200, Bernhard Reutner-Fischer wrote: > On 27 July 2017 10:43:09 CEST, Richard Biener <richard.guent...@gmail.com> > wrote: > >On Thu, Jul 27, 2017 at 10:30 AM, <tbsaunde+...@tbsaunde.org> wrote: > >> From: Trevor Sa

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

2017-07-26 Thread Trevor Saunders
On Mon, Jul 24, 2017 at 04:05:12PM -0400, 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

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

2017-07-17 Thread Trevor Saunders
On Mon, Jul 17, 2017 at 09:51:40AM -0600, Jeff Law wrote: > On 07/16/2017 12:36 PM, Trevor Saunders wrote: > >>> On the other hand if probing is fast enough that it can be on by default > >>> in gcc there should be much less of it. Even if you did change the ABI > &

Re: [PATCH][PING] Improve extraction of changed file in contrib/mklog

2017-07-17 Thread Trevor Saunders
On Mon, Jul 17, 2017 at 08:22:56AM +0100, Yuri Gribov wrote: > Hi, > > Currently mklog will fail to analyze lines like this in patches: > diff -rupN gcc/gcc/testsuite/lib/profopt.exp > gcc-compare-checks/gcc/testsuite/lib/profopt.exp > (it fails with "Error: failed to parse diff for ... and

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

2017-07-16 Thread Trevor Saunders
On Wed, Jul 12, 2017 at 03:08:28PM -0600, Jeff Law wrote: > On 07/12/2017 06:47 AM, Trevor Saunders wrote: > > On Tue, Jul 11, 2017 at 08:02:26PM -0600, Jeff Law wrote: > >> On 07/11/2017 06:20 PM, Wilco Dijkstra wrote: > >>> Jeff Law wrote: > >>>> a

Re: [PATCH 3/3] matching tokens: C++ parts

2017-07-16 Thread Trevor Saunders
On Wed, Jul 12, 2017 at 09:11:55AM -0600, Martin Sebor wrote: > On 07/12/2017 07:13 AM, Trevor Saunders wrote: > > On Tue, Jul 11, 2017 at 11:24:45AM -0400, David Malcolm wrote: > > > +/* Some tokens naturally come in pairs e.g.'(' and ')'. > > > + This class is for tr

Re: [PATCH 3/3] matching tokens: C++ parts

2017-07-12 Thread Trevor Saunders
On Tue, Jul 11, 2017 at 11:24:45AM -0400, David Malcolm wrote: > +/* Some tokens naturally come in pairs e.g.'(' and ')'. > + This class is for tracking such a matching pair of symbols. > + In particular, it tracks the location of the first token, > + so that if the second token is missing,

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

2017-07-12 Thread Trevor Saunders
On Tue, Jul 11, 2017 at 08:02:26PM -0600, Jeff Law wrote: > On 07/11/2017 06:20 PM, Wilco Dijkstra wrote: > > Jeff Law wrote: > >> aarch64 is the first target that does not have any implicit probes in > >> the caller. Thus at prologue entry it must make conservative > >> assumptions about the

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

2017-07-10 Thread Trevor Saunders
On Mon, Jul 03, 2017 at 01:32:46PM -0400, David Malcolm wrote: > On Mon, 2017-07-03 at 10:25 -0600, Jeff Law wrote: > > On 05/05/2017 11:51 AM, David Malcolm wrote: > > > In various places we use lookup_name_fuzzy to provide a hint, > > > and can report messages of the form: > > > error: unknown

Re: C/C++ PATCH to implement -Wmultiline-expansion (PR c/80116)

2017-06-01 Thread Trevor Saunders
On Thu, Jun 01, 2017 at 06:45:17PM +0200, Marek Polacek wrote: > A motivating example for this warning can be found e.g. in > > PRE10-C. Wrap multistatement macros in a do-while loop > https://www.securecoding.cert.org/confluence/x/jgL7 > > i.e., > > #define SWAP(x, y) \ > tmp = x; \ >

Re: [PATCH] Try harder to fix recently introduced crashes in ggc_collect

2017-05-24 Thread Trevor Saunders
On Fri, May 19, 2017 at 10:10:23AM -0400, Nathan Sidwell wrote: > On 05/19/2017 10:05 AM, Bernd Edlinger wrote: > > > hwi cannot be the root cause of the problem, > > because it can only be long_integer_type_node > > or long_long_integer_type_node, otherwise > > an error would be triggered. > >

Re: [PATCH] plugin.c (try_init_one_plugin): Fix ressource leaks (CID 726637)

2017-05-14 Thread Trevor Saunders
On Sun, May 14, 2017 at 11:59:40AM +0200, Sylvestre Ledru wrote: > Add missing dlclose() > > S > > > From d0926b84047f281a29dc51bbd0a4bdda01a5c63f Mon Sep 17 00:00:00 2001 > From: Sylvestre Ledru > Date: Sun, 14 May 2017 11:28:38 +0200 > Subject: [PATCH 4/5] 2017-05-14

Re: [PATCH 05/13] allow constructing a auto_vec with a preallocation, and a possibly larger actual allocation size

2017-05-11 Thread Trevor Saunders
On Thu, May 11, 2017 at 10:01:51AM +0200, Richard Biener wrote: > On Thu, May 11, 2017 at 9:45 AM, Trevor Saunders <tbsau...@tbsaunde.org> > wrote: > > On Wed, May 10, 2017 at 07:54:13AM +0100, Richard Sandiford wrote: > >> tbsaunde+...@tbsaunde.org writes: > >&g

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

2017-05-11 Thread Trevor Saunders
On Wed, May 10, 2017 at 07:44:17AM +0100, Richard Sandiford wrote: > tbsaunde+...@tbsaunde.org writes: > > From: Trevor Saunders <tbsaunde+...@tbsaunde.org> > > > > This make the sbitmap version return true if the bit was previously > > unset to make it similar t

Re: [PATCH 05/13] allow constructing a auto_vec with a preallocation, and a possibly larger actual allocation size

2017-05-11 Thread Trevor Saunders
On Wed, May 10, 2017 at 07:54:13AM +0100, Richard Sandiford wrote: > tbsaunde+...@tbsaunde.org writes: > > From: Trevor Saunders <tbsaunde+...@tbsaunde.org> > > > > This allows us to set the capacity of the vector when we construct it, > > and still use a stack buf

Re: [PATCH 01/13] improve safety of freeing bitmaps

2017-05-10 Thread Trevor Saunders
On Wed, May 10, 2017 at 10:14:17AM +0200, Richard Biener wrote: > On Tue, May 9, 2017 at 10:52 PM, <tbsaunde+...@tbsaunde.org> wrote: > > From: Trevor Saunders <tbsaunde+...@tbsaunde.org> > > > > There's two groups of changes here, first taking a sbitmap

Re: [PATCH, RFC] warn about raw pointers that can be unique_ptr

2017-05-08 Thread Trevor Saunders
On Mon, May 08, 2017 at 10:28:13AM +0200, Marc Glisse wrote: > On Sun, 7 May 2017, Trevor Saunders wrote: > > > On Sun, May 07, 2017 at 07:32:48PM +0200, Marc Glisse wrote: > > > On Sun, 7 May 2017, tbsaunde+...@tbsaunde.org wrote: > > > > > > > This is

Re: [PATCH, RFC] warn about raw pointers that can be unique_ptr

2017-05-07 Thread Trevor Saunders
On Sun, May 07, 2017 at 07:32:48PM +0200, Marc Glisse wrote: > On Sun, 7 May 2017, tbsaunde+...@tbsaunde.org wrote: > > > This is a start at warning about various resource allocation issues that > > can be > > improved. Currently it only warns about functions that call malloc and then > >

Re: [PATCH 2/n] [PR tree-optimization/78496] Simplify ASSERT_EXPRs to facilitate jump threading

2017-05-06 Thread Trevor Saunders
> +simplify_assert_expr_using_ranges (gimple *stmt) > +{ > + return false; I assume you didn't mean to leave that in? Trev

Re: [PATCH 1/N] Introduce dump_flags_t type and use it instead of int type.

2017-05-06 Thread Trevor Saunders
On Fri, May 05, 2017 at 01:38:21PM +0200, Richard Biener wrote: > On Fri, May 5, 2017 at 12:41 PM, Martin Liška wrote: > > Hello. > > > > There's first patch that just defines dump_flags_t as uint64_t and changes > > all > > corresponding interfaces that do use it. There's a

Re: PR80613

2017-05-04 Thread Trevor Saunders
On Thu, May 04, 2017 at 11:52:31AM -0600, Martin Sebor wrote: > On 05/04/2017 10:00 AM, Prathamesh Kulkarni wrote: > > Hi, > > As mentioned in PR, the issue is that cddce1 marks the call to > > __builtin_strdup as necessary: > > marking necessary through .MEM_6 stmt p_7 = __builtin_strdup (); > >

Re: [PATCH] RFC: spellchecker for comments, plus -Wfixme and -Wtodo

2017-05-02 Thread Trevor Saunders
On Tue, May 02, 2017 at 03:08:01PM -0400, David Malcolm wrote: > Currently the C/C++ frontends discard comments when parsing. > It's possible to set up libcpp to capture comments as tokens, > by setting CPP_OPTION (pfile, discard_comments) to false), > and this can be enabled using the -C command

Re: [PATCH GCC8][04/33]Single interface finding invariant variables

2017-04-18 Thread Trevor Saunders
On Tue, Apr 18, 2017 at 01:58:43PM +0100, Bin.Cheng wrote: > On Tue, Apr 18, 2017 at 1:20 PM, Trevor Saunders <tbsau...@tbsaunde.org> > wrote: > > On Tue, Apr 18, 2017 at 10:39:30AM +, Bin Cheng wrote: > >> -find_depends (tree *expr_p, int *ws A

Re: [PATCH GCC8][04/33]Single interface finding invariant variables

2017-04-18 Thread Trevor Saunders
On Tue, Apr 18, 2017 at 10:39:30AM +, Bin Cheng wrote: > -find_depends (tree *expr_p, int *ws ATTRIBUTE_UNUSED, void *data) > +find_inv_vars_cb (tree *expr_p, int *ws ATTRIBUTE_UNUSED, void *data) > { > - bitmap *inv_vars = (bitmap *) data; > + struct walk_tree_data *wdata = (struct

Re: [PATCH 4/5 ][P1] [PR tree-optimization/71437] Use a dominator order walk rather than random for VRP threading

2017-03-17 Thread Trevor Saunders
On Thu, Mar 16, 2017 at 01:17:13PM -0600, Jeff Law wrote: > +thread_outgoing_edges (basic_block bb, gcond *dummy_cond, > +class const_and_copies *const_and_copies, > +class avail_exprs_stack *avail_exprs_stack, nit picking, but what's the point in the class

Re: [PATCH 2/5][P1][tree-optimization/71437] Record more equivalences in some cases

2017-03-16 Thread Trevor Saunders
On Thu, Mar 16, 2017 at 09:03:43AM -0600, Jeff Law wrote: > On 03/16/2017 06:54 AM, Trevor Saunders wrote: > > > + if (TREE_CODE (op0) == SSA_NAME && integer_zerop (op1)) > > > + { > > > + enum tree_code code = eq->cond.ops.binary.op; > &

Re: [PATCH 2/5][P1][tree-optimization/71437] Record more equivalences in some cases

2017-03-16 Thread Trevor Saunders
On Wed, Mar 15, 2017 at 09:18:27PM -0600, Jeff Law wrote: > On 03/15/2017 09:17 PM, Jeff Law wrote: > > > > Patch #3 will remove handle_dominating_asserts from the core of the jump > > threading code and push it into VRP's callbacks where it should always > > have been. > > > > As a side effect

Re: [wwwdocs, coding conventions] Mention OVERRIDE/FINAL

2017-02-03 Thread Trevor Saunders
On Fri, Feb 03, 2017 at 09:34:52AM +0100, Gerald Pfeifer wrote: > On Fri, 14 Oct 2016, David Malcolm wrote: > > On Fri, 2016-10-14 at 16:27 +0100, Pedro Alves wrote: > >> FYI, I pushed these in now. I also bootstrapped with the > >> jit included in the selected languages, and hacked the > >> jit

Re: [PATCH] Fix PR79278, amend ADJUST_FIELD_ALIGN interface

2017-02-01 Thread Trevor Saunders
On Wed, Feb 01, 2017 at 09:42:08AM +0100, Richard Biener wrote: > On Tue, 31 Jan 2017, Jeff Law wrote: > > > On 01/31/2017 02:01 AM, Richard Biener wrote: > > > > > > This amends ADJUST_FIELD_ALIGN to always get the type of the field > > > as argument but make the field itself optional. All

Re: [PR tree-optimization/71691] Fix unswitching in presence of maybe-undef SSA_NAMEs (take 2)

2017-01-04 Thread Trevor Saunders
On Fri, Dec 16, 2016 at 09:41:33AM -0500, Aldy Hernandez wrote: > Hi folks. > > This is a follow-up on Jeff and Richi's interaction on the aforementioned PR > here: > > https://gcc.gnu.org/ml/gcc-patches/2016-08/msg01397.html > > I decided to explore the idea of analyzing may-undefness

Re: [RFA] [PR tree-optimization/33562] [PATCH 1/4] Byte tracking in DSE

2016-12-21 Thread Trevor Saunders
On Sat, Dec 17, 2016 at 01:19:41AM -0700, Jeff Law wrote: > On 12/16/2016 12:29 AM, Trevor Saunders wrote: > > On Thu, Dec 15, 2016 at 06:54:43PM -0700, Jeff Law wrote: > > >unsigned cnt = 0; > > > + bitmap live_bytes = NULL; > > > + bitmap orig_live_byt

  1   2   3   4   5   >