Init df for split pass since some target use REG_NOTE in split pattern

2016-07-24 Thread Kito Cheng
Hi all: Some target(for example i386, sh and h8300) use find_regno_note in split pattern but df infrastructure seem not initialize at split pass, so it may got wrong note since it's out-of-date. ChangeLog 2016-07-25 Kito Cheng * gcc/recog.c (split_all_insns): Initialize df for split pa

Re: [PATCH] Teach VRP to register assertions along default switch labels (PR 18046)

2016-07-24 Thread Patrick Palka
On Fri, 22 Jul 2016, Patrick Palka wrote: > On Fri, 22 Jul 2016, Patrick Palka wrote: > > > On Fri, 22 Jul 2016, Patrick Palka wrote: > > > > > This patch teaches VRP to register along a default switch label > > > assertions that corresponds to the anti range of each case label. > > > > > > Doe

Revert 2015-11-09 sanitizer/obstack configury

2016-07-24 Thread Alan Modra
The 2015-11-23 sanitizer merge from upstream lost the changes from f6528435 to sanitizer_common/sanitizer_common_interceptors.inc, which made use of _OBSTACK_SIZE_T. So the configury changes to define _OBSTACK_SIZE_T don't do anything. This wasn't such a bad thing anyway.. The configure test wro

[PR70920] transform (intptr_t) x eq/ne CST to x eq/ne (typeof x) cst

2016-07-24 Thread Prathamesh Kulkarni
Hi Richard, The attached patch tries to fix PR70920. It adds your pattern from comment 1 in the PR (with additional gating on INTEGRAL_TYPE_P to avoid regressing finalize_18.f90) and second pattern, which is reverse of the first transform. I needed to update ssa-dom-branch-1.c because with patch ap

C++ PATCH for c++/71515 (typename in partial specialization)

2016-07-24 Thread Jason Merrill
Here we got into infinite recursion trying to determine if A is the same as A::type> because we would keep trying to resolve the typename, which would want to compare the types again to see if A is a currently open class, and so on. This patch avoids this recursion by checking whether the typename

Re: [v3 PATCH] Implement std::string_view and P0254r2, Integrating std::string_view and std::string.

2016-07-24 Thread Ville Voutilainen
On 19 July 2016 at 21:34, Ville Voutilainen wrote: > Tested on Linux-x64. > > I'm quite sure there are cosmetic issues left in this patch, like in the > section > references of the tests. I will send it out for review now anyway. I fixed the section references for the tests that add new tests fo

[PATCH 2/3] haifa-sched.c: make twins a auto_vec

2016-07-24 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-07-24 Trevor Saunders * haifa-sched.c (add_to_speculative_block): Make twins a vector. --- gcc/haifa-sched.c | 25 - 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c

[PATCH 3/3] merge adjust_cost and adjust_cost_2 target hooks

2016-07-24 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-07-24 Trevor Saunders * config/alpha/alpha.c (alpha_adjust_cost): Adjust. * config/arm/arm-protos.h (struct tune_params): Likewise. * config/arm/arm.c (xscale_sched_adjust_cost): Likewise. (cortex_a9_sched_adjust_cost)

[PATCH 1/3] make pattern_regs a vec

2016-07-24 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-07-24 Trevor Saunders * store-motion.c (struct st_expr): Make pattern_regs a vector. (extract_mentioned_regs): Append to a vector instead of returning a rtx_expr_list. (st_expr_entry): Adjust. (store_ops_ok): L

[PATCH 0/3] more removal of rtl lists

2016-07-24 Thread tbsaunde+gcc
From: Trevor Saunders Hi, Here's a few more patches getting rid of usage of rtl lists. In patches 1 and 2 a list is created and then iterated over, which would generally seem to be a better fit for a vector than a linked list. The code involved in patch 3 doesn't really use a list at all, it j

Re: [PATCH RFC] do not take mutex in _Unwind_Find_registered_FDE if there is no registered objects

2016-07-24 Thread Gleb Natapov
Thank you for prompt review. On Sun, Jul 24, 2016 at 11:00:53AM -0700, Andrew Pinski wrote: > On Sun, Jul 24, 2016 at 8:01 AM, Gleb Natapov wrote: > > _Unwind_Find_FDE calls _Unwind_Find_registered_FDE and it takes lock even > > when there is no registered objects. As far as I see only statically

Re: [PATCH RFC] do not take mutex in _Unwind_Find_registered_FDE if there is no registered objects

2016-07-24 Thread Andrew Pinski
On Sun, Jul 24, 2016 at 8:01 AM, Gleb Natapov wrote: > _Unwind_Find_FDE calls _Unwind_Find_registered_FDE and it takes lock even > when there is no registered objects. As far as I see only statically > linked applications call __register_frame_info* functions, so for > dynamically linked executabl

Re: [PATCH] Teach VRP to register assertions along default switch labels (PR 18046)

2016-07-24 Thread Andrew Pinski
On Sun, Jul 24, 2016 at 9:49 AM, Patrick Palka wrote: > On Sat, Jul 23, 2016 at 9:13 PM, kugan > wrote: >> >> >> On 23/07/16 05:26, Patrick Palka wrote: >>> >>> This patch teaches VRP to register along a default switch label >>> assertions that corresponds to the anti range of each case label. >>

Re: [PATCH] Teach VRP to register assertions along default switch labels (PR 18046)

2016-07-24 Thread Patrick Palka
On Sat, Jul 23, 2016 at 9:13 PM, kugan wrote: > > > On 23/07/16 05:26, Patrick Palka wrote: >> >> This patch teaches VRP to register along a default switch label >> assertions that corresponds to the anti range of each case label. > > > Hi Patrick, > > In case of a larger switch statement with cas

Re: [PATCH 1/6] add auto_sbitmap class

2016-07-24 Thread Richard Biener
On July 24, 2016 1:44:44 PM GMT+02:00, tbsaunde+...@tbsaunde.org wrote: >From: Trevor Saunders > >gcc/ChangeLog: > >2016-07-24 Trevor Saunders > > * sbitmap.h (auto_sbitmap): New class. OK. Richard. > gcc/sbitmap.h | 21 + > 1 file changed, 21 insertions(+) > >diff -

Re: [PATCH 6/6] add [cd]tors to scc_info

2016-07-24 Thread Richard Biener
On July 24, 2016 1:44:49 PM GMT+02:00, tbsaunde+...@tbsaunde.org wrote: >From: Trevor Saunders > >gcc/ChangeLog: > >2016-07-24 Trevor Saunders > > * tree-ssa-structalias.c (struct scc_info): Change types of > members to auto_sbitmap and auto_vec. > (scc_info::scc_info): New co

[PATCH RFC] do not take mutex in _Unwind_Find_registered_FDE if there is no registered objects

2016-07-24 Thread Gleb Natapov
_Unwind_Find_FDE calls _Unwind_Find_registered_FDE and it takes lock even when there is no registered objects. As far as I see only statically linked applications call __register_frame_info* functions, so for dynamically linked executables taking the lock to check unseen_objects and seen_objects is

[Patch, libfortran] Multi-threaded random_number

2016-07-24 Thread Janne Blomqvist
Hi, the attached patch replaces the current random_number / random_seed implementations with an implementation that better supports threads. It's an improved version of the RFC patch I posted earlier at https://gcc.gnu.org/ml/gcc-patches/2015-12/msg02110.html . Please see that earlier message for

[PATCH 3/6] add ctor to topo_info

2016-07-24 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-07-24 Trevor Saunders * tree-ssa-structalias.c (struct topo_info): Add constructor, and change types of members to auto_vec and auto_sbitmap. (init_topo_info): Remove. (topo_info::topo_info): New constructor. (

[PATCH 2/6] use auto_sbitmap in various places

2016-07-24 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-07-24 Trevor Saunders * bt-load.c (compute_out): Use auto_sbitmap class. (link_btr_uses): Likewise. * cfganal.c (mark_dfs_back_edges): Likewise. (post_order_compute): Likewise. (inverted_post_order_compute): Li

[PATCH 4/6] remove elim_graph typedef

2016-07-24 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-07-24 Trevor Saunders * tree-outof-ssa.c (struct elim_graph): Remove typedef. (new_elim_graph): Adjust. (clear_elim_graph): Likewise. (delete_elim_graph): Likewise. (elim_graph_size): Likewise. (elim_gr

[PATCH 6/6] add [cd]tors to scc_info

2016-07-24 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-07-24 Trevor Saunders * tree-ssa-structalias.c (struct scc_info): Change types of members to auto_sbitmap and auto_vec. (scc_info::scc_info): New constructor. (scc_info::~scc_info): New destructor. (init_scc_in

[PATCH 5/6] add a constructor to elim_graph

2016-07-24 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-07-24 Trevor Saunders * tree-outof-ssa.c (struct elim_graph): Change type of members to auto_vec and auto_sbitmap. (elim_graph::elim_graph): New constructor. (delete_elim_graph): Remove. (expand_phi_nodes): Adj

[PATCH 0/6] add and use an auto_sbitmap class

2016-07-24 Thread tbsaunde+gcc
From: Trevor Saunders Hi, This series adds a auto_sbitmap class that manages the lifetime of a sbitmap. Then it replaces most manual management with uses of auto_sbitmap. patches individually bootstrapped + regtested on x86_linux-gnu, ok? Trev Trevor Saunders (6): add auto_sbitmap class

[PATCH 1/6] add auto_sbitmap class

2016-07-24 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-07-24 Trevor Saunders * sbitmap.h (auto_sbitmap): New class. --- gcc/sbitmap.h | 21 + 1 file changed, 21 insertions(+) diff --git a/gcc/sbitmap.h b/gcc/sbitmap.h index c208171..d4a2918 100644 --- a/gcc/sbitmap.h +++ b/g