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

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

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

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

[PATCH 11/19] remove unused build_var_debug_value prototype

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[PATCH 0/2] add unique_ptr class

2017-07-31 Thread tbsaunde+gcc
From: Trevor Saunders Hi, 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 believe the gtl namespace also comes from Pedro, but GNU template library seems as reasonable as any other name

[PATCH 2/2] use unique_ptr some

2017-07-31 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2017-07-31 Trevor Saunders * cse.c (find_comparison_args): Make visited a unique_ptr. * lto-streamer-out.c (write_global_references): Make data a unique_ptr. * tree-cfg.c (move_sese_region_to_fn): Make several variables

[PATCH 1/2] add unique_ptr header

2017-07-31 Thread tbsaunde+gcc
From: Trevor Saunders For most of the history of this see https://sourceware.org/ml/gdb-patches/2016-10/msg00223.html The changes are mostly s/gdb/gtl/g include/ChangeLog: 2017-07-29 Trevor Saunders * unique-ptr.h: New file. --- include/unique-ptr.h | 386 +

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

2017-05-07 Thread tbsaunde+gcc
From: Trevor Saunders Hi, 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 always pass the resulting pointer to free(). It should be pretty simple to extend this to new/delete and new[]/d

[PATCH 01/13] improve safety of freeing bitmaps

2017-05-09 Thread tbsaunde+gcc
From: Trevor Saunders There's two groups of changes here, first taking a sbitmap &, so that we can assign null to the pointer after freeing the sbitmap to prevent use after free through that pointer. Second we define overloads of sbitmap_free and bitmap_free taking auto_sbitmap and auto_bitmap r

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

2017-05-09 Thread tbsaunde+gcc
From: Trevor Saunders This make the sbitmap version return true if the bit was previously unset to make it similar to the bitmap version. gcc/ChangeLog: 2017-05-09 Trevor Saunders * sbitmap.h (bitmap_set_bit): Return bool similar to bitmap version of this function. --- gcc/sbitmap.

[PATCH 00/13] misc data structure stuff

2017-05-09 Thread tbsaunde+gcc
From: Trevor Saunders Hi, this is sort of a grab bag, but mostly improving bitmaps and auto_vec, and then using them in more places. Individually patches commit messages should explain in more detail where needed. patches individually bootstrapped and regtested on x86_64-linux-gnu, ok? Thank

[PATCH 03/13] store the bitmap_head within the auto_bitmap

2017-05-09 Thread tbsaunde+gcc
From: Trevor Saunders This gets rid of one allocation per bitmap. Often the bitmap_head is now on the stack, when it isn't its part of some other struct on the heap instead of being refered to by that struct. On 64 bit platforms this will increase the size of such structs by 24 bytes, but its a

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

2017-05-09 Thread tbsaunde+gcc
From: Trevor Saunders This allows us to set the capacity of the vector when we construct it, and still use a stack buffer when the size is small enough. gcc/ChangeLog: 2017-05-09 Trevor Saunders * genrecog.c (int_set::int_set): Explicitly construct our auto_vec base class. *

[PATCH 06/13] replace some manual stacks with auto_vec

2017-05-09 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2017-05-09 Trevor Saunders * cfganal.c (mark_dfs_back_edges): Replace manual stack with auto_vec. (post_order_compute): Likewise. (inverted_post_order_compute): Likewise. (pre_and_rev_post_order_compute_fn): Likewis

[PATCH 04/13] allow auto_bitmap to use other bitmap obstacks

2017-05-09 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2017-05-07 Trevor Saunders * bitmap.h (class auto_bitmap): New constructor taking bitmap_obstack * argument. --- gcc/bitmap.h | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/bitmap.h b/gcc/bitmap.h index 49aec001cb0..2ddeee6bc10 100644 --

[PATCH 08/13] move several bitmaps from gc memory to the default obstack and use auto_bitmap

2017-05-09 Thread tbsaunde+gcc
From: Trevor Saunders These places where probably trying to use the default bitmap obstack, but passing 0 to bitmap_initialize actually uses gc allocation. In any case they are all cleaned up before going out of scope so using auto_bitmap should be fine. gcc/ChangeLog: 2017-05-09 Trevor Saund

[PATCH 10/13] make a member an auto_sbitmap

2017-05-09 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2017-05-09 Trevor Saunders * tree-ssa-dse.c (dse_dom_walker): Make m_live_byes a auto_sbitmap. --- gcc/tree-ssa-dse.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/gcc/tree-ssa-dse.c b/gcc/tree-ssa-dse.c i

[PATCH 11/13] make more vars auto_sbitmaps

2017-05-09 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2017-05-09 Trevor Saunders * ddg.c (find_nodes_on_paths): Use auto_sbitmap. (longest_simple_path): Likewise. * shrink-wrap.c (spread_components): Likewise. (disqualify_problematic_components): Likewise. (emit_common

[PATCH 07/13] use auto_bitmap more

2017-05-09 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2017-05-09 Trevor Saunders * bt-load.c (combine_btr_defs): Use auto_bitmap to manage bitmap lifetime. (migrate_btr_def): Likewise. * cfgloop.c (get_loop_body_in_bfs_order): Likewise. * df-core.c (loop_post_order_com

[PATCH 12/13] make depth_first_search_ds a class

2017-05-09 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2017-05-09 Trevor Saunders * cfganal.c (connect_infinite_loops_to_exit): Adjust. (depth_first_search::depth_first_search): Change structure init function to this constructor. (depth_first_search::add_bb): Rename function to this me

[PATCH 09/13] use auto_bitmap more with alternate obstacks

2017-05-09 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2017-05-09 Trevor Saunders * df-core.c (df_set_blocks): Start using auto_bitmap. (df_compact_blocks): Likewise. * df-problems.c (df_rd_confluence_n): Likewise. * df-scan.c (df_insn_rescan_all): Likewise. (df_process

[PATCH 13/13] make inverted_post_order_compute() operate on a vec

2017-05-09 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2017-05-09 Trevor Saunders * cfganal.c (inverted_post_order_compute): Change argument type to vec *. * cfganal.h (inverted_post_order_compute): Adjust prototype. * df-core.c (rest_of_handle_df_initialize): Adjust. (

[PATCH 00/18] towards removing rtx_insn_list and rtx_expr_list

2016-04-19 Thread tbsaunde+gcc
From: Trevor Saunders Hi, I have some more patches that almost completely eliminate these, but I haven't tested the rest yet, and this is already a long series so it would be nice to get some of it out of my tree and reviewed. patches individually bootstrapped and regtested on x86_64-linux-gnu,

[PATCH 01/18] stop using rtx_insn_list in reorg.c

2016-04-19 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-04-19 Trevor Saunders * reorg.c (try_merge_delay_insns): Make merged_insns a vector. --- gcc/reorg.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/gcc/reorg.c b/gcc/reorg.c index 7b28821..8fb91

[PATCH 03/18] make antic_stores a vec

2016-04-19 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-04-19 Trevor Saunders * store-motion.c (struct st_expr): Make antic_stores a vector. (st_expr_entry): Adjust. (free_st_expr_entry): Likewise. (print_store_motion_mems): Likewise. (find_moveable_store): Likewise

[PATCH 02/18] make avail_stores a vec

2016-04-19 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-04-19 Trevor Saunders * print-rtl.c (print_rtx_insn_vec): New function. * print-rtl.h: New prototype. * rtl.h: Likewise. * store-motion.c (struct st_expr): Make avail_stores a vector. (st_expr_entry): Adjust.

[PATCH 07/18] loop-iv.c: make cond_list a vec

2016-04-19 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-04-19 Trevor Saunders * loop-iv.c (simplify_using_initial_values): Make cond_list a vector. --- gcc/loop-iv.c | 55 ++- 1 file changed, 18 insertions(+), 37 deletions(-) diff --git a/gcc/l

[PATCH 05/18] make stores rtx_insn_list a vec

2016-04-19 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-04-19 Trevor Saunders * gcse.c (struct ls_expr): make stores field a vector. (ldst_entry): Adjust. (free_ldst_entry): Likewise. (print_ldst_list): Likewise. (compute_ld_motion_mems): Likewise. (update_l

[PATCH 04/18] remove unused loads rtx_insn_list

2016-04-19 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-04-19 Trevor Saunders * gcse.c (struct ls_expr): Remove loads field. (ldst_entry): Adjust. (free_ldst_entry): Likewise. (print_ldst_list): Likewise. (compute_ld_motion_mems): Likewise. --- gcc/gcse.c | 14 +---

[PATCH 08/18] make side_effects a vec

2016-04-19 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-04-19 Trevor Saunders * var-tracking.c (struct adjust_mem_data): Make side_effects a vector. (adjust_mems): Adjust. (adjust_insn): Likewise. (prepare_call_arguments): Likewise. --- gcc/var-tracking.c | 30 +++-

[PATCH 06/18] move reg_equivs out of gc memory

2016-04-19 Thread tbsaunde+gcc
From: Trevor Saunders It used the gc vector type, but isn't marked as a gc route, and appears to be manually managed, so it should be safe to use the normal heap vector. gcc/ChangeLog: 2016-04-19 Trevor Saunders * ira-emit.c (emit_move_list): Adjust. * ira.c (fix_reg_equiv_i

[PATCH 13/18] haifa-sched.c: make twins a auto_vec

2016-04-19 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-04-19 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 11/18] add some utility methods to vec

2016-04-19 Thread tbsaunde+gcc
From: Trevor Saunders Later patches use these functions, and I believe Mikhail has mentioned before he'd like to have begin / end () on vec before. gcc/ChangeLog: 2016-04-19 Trevor Saunders * vec.h (vec_safe_contains): New function. (vec::contains): Likewise. (vec::b

[PATCH 16/18] make forced labels a vec

2016-04-19 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-04-20 Trevor Saunders * cfgbuild.c (make_edges): Adjust. * cfgrtl.c (can_delete_label_p): Likewise. * dwarf2cfi.c (create_trace_edges): Likewise. * except.c (sjlj_emit_dispatch_table): Likewise. * function.h (s

[PATCH 09/18] make pattern_regs a vec

2016-04-19 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-04-19 Trevor Saunders * store-motion.c (struct st_expr): Make pattern_regs a vector. (st_expr_entry): Adjust. (store_ops_ok): Likewise. (extract_mentioned_regs): Likewise. (store_killed_in_insn): Likewise.

[PATCH 17/18] make pending_{read,write}_insns vec

2016-04-19 Thread tbsaunde+gcc
From: Trevor Saunders The old versions of the functions copied here are removed in later patches in my queue once all the lists are gone from sched-*. However they are necessary temporarily to not have to convert all the lists at once which made writing and hopefully reviewing these patches much

[PATCH 15/18] make nonlocal_goto_handler_labels a vec

2016-04-19 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-04-20 Trevor Saunders * builtins.c (expand_builtin): Adjust. * cfgbuild.c (make_edges): Likewise. * cfgrtl.c (delete_insn): Likewise. (cfg_layout_initialize): Likewise. * dwarf2cfi.c (create_trace_edges): Likew

[PATCH 10/18] merge adjust_cost and adjust_cost_2 target hooks

2016-04-19 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-04-19 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 18/18] make last_pending_memory_flush a vec

2016-04-19 Thread tbsaunde+gcc
From: Trevor Saunders Same story for the new functions here as for the previous patch. gcc/ChangeLog: 2016-04-20 Trevor Saunders * sched-deps.c (remove_from_dependence_list): Adjust. (flush_pending_lists): Likewise. (sched_analyze_2): Likewise. (sched_analyze

[PATCH 14/18] haifa-sched.c: make ready_list an auto_vec

2016-04-19 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-04-20 Trevor Saunders * haifa-sched.c (fix_recovery_deps): Make ready_list a vector. --- gcc/haifa-sched.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c index 34c5cc5..8

[PATCH 12/18] haifa-sched.c: make insn_queue[] a vec

2016-04-19 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-04-19 Trevor Saunders * haifa-sched.c (queue_insn): Adjust. (queue_remove): Likewise. (check_clobbered_conditions): Likewise. (struct haifa_saved_data): Make insn_queue a vector. (save_backtrack_point): Adjust.

[PATCH 0/8] make next_*_insn take rtx_insn * arguments

2016-09-14 Thread tbsaunde+gcc
From: Trevor Saunders Hi, Basically $subject. First change variable's type to rtx_insn * where possible. Then change the functions and fixup callers where it is still necessary to cast. patches bootstrapped and regtested individually on x86_64-linux-gnu, and the series was run through config-l

[PATCH 1/8] change a few rtx_insn * to rtx_jump_insn *

2016-09-14 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-09-06 Trevor Saunders * bb-reorder.c (fix_crossing_unconditional_branches): Make type of jump_insn rtx_jump_insn *. * reorg.c (steal_delay_list_from_target): Make type of insn rtx_jump_insn *. (follow_jumps): M

[PATCH 2/8] use rtx_insn * more

2016-09-14 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-09-06 Trevor Saunders * config/arc/arc-protos.h (arc_label_align): Change type of variables from rtx to rtx_insn *. * config/arc/arc.c (arc_label_align): Likewise. * config/arm/arm.c (any_sibcall_could_use_r3): Likewis

[PATCH 4/8] make next/prev nondebug_insn take rtx_insn *

2016-09-14 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-09-13 Trevor Saunders * emit-rtl.c (next_nondebug_insn): Change argument type to rtx_insn *. (prev_nondebug_insn): Likewise. * loop-doloop.c (doloop_condition_get): Likewise. * rtl.h: Adjust prototype.

[PATCH 3/8] make next/prev _nonnote_insn take rtx_insn *

2016-09-14 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-09-13 Trevor Saunders * emit-rtl.c (next_nonnote_insn): Change argument type to rtx_insn *. (prev_nonnote_insn): Likewise. * jump.c (reversed_comparison_code_parts): Likewise. (reversed_comparison): Likewise.

[PATCH 6/8] make next/prev nonnote_nondebug_insn take rtx_insn *

2016-09-14 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-09-14 Trevor Saunders * config/cris/cris.c (cris_asm_output_case_end): Change argument type to rtx_insn *. * emit-rtl.c (next_nonnote_nondebug_insn): Likewise. (prev_nonnote_nondebug_insn): Likewise. * config/cris/cris

[PATCH 8/8] make next_cc0_user take rtx_insn *

2016-09-14 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-09-14 Trevor Saunders * emit-rtl.c (next_cc0_user): Make argument type rtx_insn *. * rtl.h: Adjust prototype. --- gcc/emit-rtl.c | 4 +--- gcc/rtl.h | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/gcc/emit

[PATCH 5/8] make prev_real_insn take rtx_insn *

2016-09-14 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-09-13 Trevor Saunders * emit-rtl.c (prev_real_insn): Change argument type to rtx_insn *. * rtl.h: Adjust prototype. * config/sh/sh.md: Adjust. * dwarf2out.c (add_var_loc_to_decl): Likewise. --- gcc/config/sh/sh.md | 3

[PATCH 7/8] make next/prev active_insn and active_insn_p take rtx_insn *

2016-09-14 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-09-14 Trevor Saunders * emit-rtl.c (next_active_insn): Change argument type to rtx_insn *. (prev_active_insn): Likewise. (active_insn_p): Likewise. * rtl.h: Adjust prototypes. * cfgcleanup.c (merge_bloc

[PATCH 0/7] more rtx-insn stuff

2016-10-17 Thread tbsaunde+gcc
From: Trevor Saunders Hi, Rather late (travel and then busy day job interfiered), but this includes the promised conversion of LABEL_REF_LABEL and tablejump_p to use rtx_insn *. Followed by a bit more random conversion of things to use rtx_insn *. patches individually bootstrapped + regtested

[PATCH 4/7] remove cast to rtx_insn * in remove_note

2016-10-17 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-10-17 Trevor Saunders * config/rl78/rl78.c (gen-and_emit_move): Change argument type to rtx_insn *. (transcode_memory_rtx): Likewise. (move_to_acc): Likewise. (move_from_acc): Likewise. (move_acc_to_reg

[PATCH 2/7] make tablejump_p return the label as a rtx_insn *

2016-10-17 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-10-17 Trevor Saunders * cfgcleanup.c (merge_blocks_move_successor_nojumps): Adjust. (outgoing_edges_match): Likewise. (try_crossjump_to_edge): Likewise. * cfgrtl.c (try_redirect_by_replacing_jump): Likewise. (r

[PATCH 6/7] remove cast from prev_nonnote_insn_bb

2016-10-17 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-10-17 Trevor Saunders * emit-rtl.c (prev_nonnote_insn_bb): Change argument type to rtx_insn *. * rtl.h (prev_nonnote_insn_bb): Adjust prototype. --- gcc/emit-rtl.c | 3 +-- gcc/rtl.h | 2 +- 2 files changed, 2 insertions

[PATCH 1/7] make LABEL_REF_LABEL a rtx_insn *

2016-10-17 Thread tbsaunde+gcc
From: Trevor Saunders While chainging LABEL_REF_LABEL it might as well become an inline function, so that its clearer what types are involved. Unfortunately because it is still possible to use XEXP and related macros on a LABEL_REF rtx you can still set the field to be a non insn rtx. The other

[PATCH 3/7] use rtx_insn * more

2016-10-17 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-10-17 Trevor Saunders * config/alpha/alpha.c (alpha_legitimize_address_1): Change variable types from rtx to rtx_insn *. (alpha_emit_xfloating_libcall): Likewise. * config/arc/arc.c (arc_emit_call_tls_get_addr): Likewi

[PATCH 5/7] remove cast in delete_insn_chain

2016-10-17 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-10-17 Trevor Saunders * cfgrtl.c (delete_insn_chain): Change argument type to rtx_insn * and adjust for that. * cfgrtl.h (delete_insn_chain): Adjust prototype. --- gcc/cfgrtl.c | 8 +++- gcc/cfgrtl.h | 2 +- 2 files chang

[PATCH 7/7] make targetm.gen_ccmp{first,next} take rtx_insn **

2016-10-17 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-10-17 Trevor Saunders * ccmp.c (expand_ccmp_expr_1): Adjust. (expand_ccmp_expr): Likewise. (expand_ccmp_next): Likewise. * config/aarch64/aarch64.c (aarch64_gen_ccmp_next): Likewise. (aarch64_gen_ccmp_first): L

[PATCH] fix an uninitialized use of loc when parsing gimple switches

2016-10-26 Thread tbsaunde+gcc
From: Trevor Saunders gcc/c/ChangeLog: 2016-10-27 Trevor Saunders * gimple-parser.c (c_parser_gimple_switch_stmt): Fix uninitialized use of loc. --- gcc/c/gimple-parser.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/c/gimple-parser.c b/gcc/c/

[PATCH 2/3] split up the trial variable in reorg.c:relax_delay_slots to use rtx_insn * more

2016-10-28 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-10-27 Trevor Saunders * reorg.c (relax_delay_slots): Split up the trial variable. --- gcc/reorg.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/gcc/reorg.c b/gcc/reorg.c index 799d27b..da4d7c6 10064

[PATCH 0/3] use rtx_insn * more

2016-10-28 Thread tbsaunde+gcc
From: Trevor Saunders HI, This series changes various variables type from rtx to rtx_insn * so that the remaining patches in this series http://gcc.gnu.org/ml/gcc-patches/2016-10/msg01353.html can be applied. patches bootstrapped and regtested on x86_64-linux-gnu, and run through config-list.m

[PATCH 3/3] split up some variables to use rtx_insn * more

2016-10-28 Thread tbsaunde+gcc
From: Trevor Saunders Note to readers, a -b diff is below the whitespace sensitive one and should be much easier to read. gcc/ChangeLog: 2016-10-27 Trevor Saunders * config/alpha/alpha.c (alpha_legitimize_address_1): Split up variables so some can be rtx_insn *. (alpha_emit_

[PATCH 1/3] use rtx_insn * in various places where it is obvious

2016-10-28 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-10-27 Trevor Saunders * config/arc/arc.c (arc_emit_call_tls_get_addr): Make the type of variables rtx_insn *. * config/arm/arm.c (arm_call_tls_get_addr): Likewise. (legitimize_tls_address): Likewise. * config/b

[PATCH] add a gimple test for PR21458

2016-10-31 Thread tbsaunde+gcc
From: Trevor Saunders A demonstration we can do the same thing with a gimple test as -fno-tree-evrp but somewhat more precisely. I tested this passes on x86_64-linux-gnu, ok? Trev gcc/testsuite/ChangeLog: 2016-10-31 Trevor Saunders * gcc.dg/tree-ssa/pr21458-3.c: New test. --- gc

[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

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

[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/2] add GCC_FINAL to ansidecl.h

2015-08-10 Thread tbsaunde+gcc
From: Trevor Saunders Hi, This allows classes and virtual functions to be marked as final if the compiler supports C++11, or is gcc 4.7 or later. bootstrapped + regtested on x86_64-linux-gnu, ok? Trev include/ChangeLog: 2015-08-10 Trevor Saunders * ansidecl.h (GCC_FINAL): New mac

[PATCH 2/2] replace several uses of the anon namespace with GCC_FINAL

2015-08-10 Thread tbsaunde+gcc
From: Trevor Saunders Hi, In many places gcc puts classes in the anon namespace so the compiler can tell they do not get inheritted from to enable better devirtualization. However debugging code in the anon namespace can be a pain, and the same thing can be accomplished more directly by marking

[PATCH] 1/n remove useless typedefs

2015-08-11 Thread tbsaunde+gcc
From: Trevor Saunders Hi, This just cleans things up slightly by removing typedefs that don't serve any real purpose in C++. If people don't object I'll go through and try and remove as many more similarly useless typedefs as I can. bootstrapped + regtest x86_64-linux-gnu, ok? Trev gcc/Chang

[PATCH] remove more useless typedefs

2015-08-19 Thread tbsaunde+gcc
From: tbsaunde Hi, more typedef cleanup. bootstrapped + regtested on x86_64-linux-gnu, commited since preapproved by richi. Trev gcc/c-family/ChangeLog: 2015-08-18 Trevor Saunders * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h, c-objc.h, c-ppoutput.c, c-p

[PATCH 0/4] a little bit of ifdef removal

2015-08-20 Thread tbsaunde+gcc
From: Trevor Saunders Hi, just more removal of conditional compilation. series run through config-list.mk, and each patch individually bootstrapped on x86_64-linux-gnu. I think this is still preapproved so committed. Trev tbsaunde (4): always define HAVE_conditional_execution remove ano

[PATCH 3/4] always define HAVE_peephole2

2015-08-20 Thread tbsaunde+gcc
From: tbsaunde gcc/ChangeLog: 2015-08-20 Trevor Saunders * genconfig.c (main): Always define HAVE_cc0. * recog.c (rest_of_handle_peephole2): Adjust. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@227051 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5

[PATCH 1/4] always define HAVE_conditional_execution

2015-08-20 Thread tbsaunde+gcc
From: tbsaunde gcc/ChangeLog: 2015-08-20 Trevor Saunders * genconfig.c (main): Always define HAVE_CONDITIONAL_EXECUTION. * targhooks.c (default_have_conditional_execution): Adjust. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@227049 138bc75d-0d04-0410-961f-82ee72b054a4

[PATCH 2/4] remove another #if for HAVE_cc0

2015-08-20 Thread tbsaunde+gcc
From: tbsaunde gcc/ChangeLog: 2015-08-20 Trevor Saunders * reorg.c (relax_delay_slots): Don't use #if to check value of HAVE_cc0. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@227050 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 + gcc/reorg.c

[PATCH 4/4] add default for CONSTANT_ALIGNMENT

2015-08-20 Thread tbsaunde+gcc
From: tbsaunde gcc/ChangeLog: 2015-08-20 Trevor Saunders * defaults.h (CONSTANT_ALIGNMENT): New macro definition. * builtins.c (get_object_alignment_2): Adjust. * varasm.c (align_variable): Likewise. (get_variable_align): Likewise

[PATCH 00/10] removal of typedefs that hide pointerness episode 1

2015-09-02 Thread tbsaunde+gcc
From: Trevor Saunders Hi, Personally I think hiding that variables are pointers is confusing, and I believe consensus is we should move away from this style. So this series starts to do that. patches individually bootstrapped + regtested on x86_64-linux-gnu, ok? Trev Trevor Saunders (10):

[PATCH 02/10] dse.c: remove some typedefs that hide pointerness

2015-09-02 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2015-09-02 Trevor Saunders * dse.c (store_info_t): Remove typedef. (group_info_t): Likewise. (const_group_info_t): Likewise. (deferred_change_t): Likewise. (get_group_info): Adjust. (free_store_info): Likewi

[PATCH 01/10] don't typedef alias_set_entry and unhide pointerness

2015-09-02 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2015-09-02 Trevor Saunders * alias.c (alias_set_entry_d): Rename to alias_set_entry. (alias_set_entry): Remove typedef. (alias_set_subset_of): Adjust. (alias_sets_conflict_p): Likewise. (init_alias_set_entry): Likew

[PATCH 06/10] tree-ssa-ter.c: remove typedefs that hide pointerness

2015-09-02 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2015-09-03 Trevor Saunders * tree-ssa-ter.c (temp_expr_table_d): Rename to temp_expr_table and remove typedef. (new_temp_expr_table): Adjust. (free_temp_expr_table): Likewise. (version_to_be_replaced_p): Likewise.

[PATCH 05/10] bt-load.c: remove typedefs that hide pointerness

2015-09-02 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2015-09-03 Trevor Saunders * bt-load.c (struct btr_def_group): Rename from btr_def_group_s. (struct btr_user): Rename from btr_user_s. (struct btr_def): Rename from btr_def_s. (find_btr_def_group): Adjust. (add_btr_

[PATCH 03/10] var-tracking.c: remove typedef of location_chain

2015-09-02 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2015-09-03 Trevor Saunders * var-tracking.c (struct location_chain): Rename from location_chain_def. (struct variable_part): Adjust. (variable_htab_free): Likewise. (unshare_variable): Likewise. (get_init_va

<    1   2   3   4   >