From 7de76362e43ddba204611a23b2292d0d6fadd1ab Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 23 Sep 2016 18:58:40 +0200 Subject: [PATCH] sel-sched-ir.c (sel_global_bb_info, [...]): Remove unnecessary = vNULL initialization of file scope vec. * sel-sched-ir.c (sel_global_bb_info, sel_region_bb_info, loop_nests, s_i_d, last_added_blocks): Remove unnecessary = vNULL initialization of file scope vec. * passes.c (pass_tab, enabled_pass_uid_range_tab, disabled_pass_uid_range_tab): Likewise. * haifa-sched.c (sched_luids, h_i_d): Likewise. * tree-chkp-opt.c (check_infos): Likewise. * sel-sched.c (vec_av_set, vec_temp_moveop_nops): Likewise. c/ * c-parser.c (incomplete_record_decls): Remove unnecessary = vNULL initialization of file scope vec. cp/ * constexpr.c (call_stack): Remove unnecessary = vNULL initialization of file scope vec. From-SVN: r240444 --- gcc/ChangeLog | 9 +++++++++ gcc/c/ChangeLog | 5 +++++ gcc/c/c-parser.c | 2 +- gcc/cp/ChangeLog | 3 +++ gcc/cp/constexpr.c | 2 +- gcc/haifa-sched.c | 4 ++-- gcc/passes.c | 8 +++----- gcc/sel-sched-ir.c | 13 +++++-------- gcc/sel-sched.c | 4 ++-- gcc/tree-chkp-opt.c | 2 +- 10 files changed, 32 insertions(+), 20 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 919b9d8693b..e32b062ad5a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,14 @@ 2016-09-23 Jakub Jelinek + * sel-sched-ir.c (sel_global_bb_info, sel_region_bb_info, + loop_nests, s_i_d, last_added_blocks): Remove unnecessary + = vNULL initialization of file scope vec. + * passes.c (pass_tab, enabled_pass_uid_range_tab, + disabled_pass_uid_range_tab): Likewise. + * haifa-sched.c (sched_luids, h_i_d): Likewise. + * tree-chkp-opt.c (check_infos): Likewise. + * sel-sched.c (vec_av_set, vec_temp_moveop_nops): Likewise. + * vec.h (vnull::operator vec): Add constexpr keyword for C++11 and later. diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog index 4c2fc5dda65..283cfdacc2f 100644 --- a/gcc/c/ChangeLog +++ b/gcc/c/ChangeLog @@ -1,3 +1,8 @@ +2016-09-23 Jakub Jelinek + + * c-parser.c (incomplete_record_decls): Remove unnecessary + = vNULL initialization of file scope vec. + 2016-09-16 Marek Polacek * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0. diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c index 58424a9e8e5..5f610e9ad7b 100644 --- a/gcc/c/c-parser.c +++ b/gcc/c/c-parser.c @@ -67,7 +67,7 @@ along with GCC; see the file COPYING3. If not see In c_parser_translation_unit(), we iterate over incomplete_record_decls and report error if any of the decls are still incomplete. */ -vec incomplete_record_decls = vNULL; +vec incomplete_record_decls; void set_c_expr_source_range (c_expr *expr, diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 9f5eba8500e..3900bba6250 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2016-09-23 Jakub Jelinek + * constexpr.c (call_stack): Remove unnecessary + = vNULL initialization of file scope vec. + * name-lookup.c (store_bindings, store_class_bindings): Don't initialize static local bindings_need_stored to vNULL. diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c index b7d49f19e7a..c5dde151c2e 100644 --- a/gcc/cp/constexpr.c +++ b/gcc/cp/constexpr.c @@ -1253,7 +1253,7 @@ cxx_bind_parameters_in_call (const constexpr_ctx *ctx, tree t, These do not need to be marked for PCH or GC. */ /* FIXME remember and print actual constant arguments. */ -static vec call_stack = vNULL; +static vec call_stack; static int call_stack_tick; static int last_cx_error_tick; diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c index c58b0ad399f..0ad080f253c 100644 --- a/gcc/haifa-sched.c +++ b/gcc/haifa-sched.c @@ -401,13 +401,13 @@ const struct common_sched_info_def haifa_common_sched_info = }; /* Mapping from instruction UID to its Logical UID. */ -vec sched_luids = vNULL; +vec sched_luids; /* Next LUID to assign to an instruction. */ int sched_max_luid = 1; /* Haifa Instruction Data. */ -vec h_i_d = vNULL; +vec h_i_d; void (* sched_init_only_bb) (basic_block, basic_block); diff --git a/gcc/passes.c b/gcc/passes.c index 07ebf8b4a2f..a210772eab8 100644 --- a/gcc/passes.c +++ b/gcc/passes.c @@ -862,7 +862,7 @@ pass_manager::register_pass_name (opt_pass *pass, const char *name) /* Map from pass id to canonicalized pass name. */ typedef const char *char_ptr; -static vec pass_tab = vNULL; +static vec pass_tab; /* Callback function for traversing NAME_TO_PASS_MAP. */ @@ -982,10 +982,8 @@ struct uid_range typedef struct uid_range *uid_range_p; -static vec - enabled_pass_uid_range_tab = vNULL; -static vec - disabled_pass_uid_range_tab = vNULL; +static vec enabled_pass_uid_range_tab; +static vec disabled_pass_uid_range_tab; /* Parse option string for -fdisable- and -fenable- diff --git a/gcc/sel-sched-ir.c b/gcc/sel-sched-ir.c index 83f813aa571..210b1e4edfb 100644 --- a/gcc/sel-sched-ir.c +++ b/gcc/sel-sched-ir.c @@ -45,12 +45,10 @@ along with GCC; see the file COPYING3. If not see #include "sel-sched-dump.h" /* A vector holding bb info for whole scheduling pass. */ -vec - sel_global_bb_info = vNULL; +vec sel_global_bb_info; /* A vector holding bb info. */ -vec - sel_region_bb_info = vNULL; +vec sel_region_bb_info; /* A pool for allocating all lists. */ object_allocator<_list_node> sched_lists_pool ("sel-sched-lists"); @@ -66,7 +64,7 @@ struct loop *current_loop_nest; /* LOOP_NESTS is a vector containing the corresponding loop nest for each region. */ -static vec loop_nests = vNULL; +static vec loop_nests; /* Saves blocks already in loop regions, indexed by bb->index. */ static sbitmap bbs_in_loop_rgns = NULL; @@ -4163,7 +4161,7 @@ finish_region_bb_info (void) /* Data for each insn in current region. */ -vec s_i_d = vNULL; +vec s_i_d; /* Extend data structures for insns from current region. */ static void @@ -4499,8 +4497,7 @@ get_av_level (insn_t insn) /* The basic block that already has been processed by the sched_data_update (), but hasn't been in sel_add_bb () yet. */ -static vec - last_added_blocks = vNULL; +static vec last_added_blocks; /* A pool for allocating successor infos. */ static struct diff --git a/gcc/sel-sched.c b/gcc/sel-sched.c index 25a100ee34f..1ed0d4bdca6 100644 --- a/gcc/sel-sched.c +++ b/gcc/sel-sched.c @@ -494,7 +494,7 @@ static int max_ws; static int num_insns_scheduled; /* A vector of expressions is used to be able to sort them. */ -static vec vec_av_set = vNULL; +static vec vec_av_set; /* A vector of vinsns is used to hold temporary lists of vinsns. */ typedef vec vinsn_vec_t; @@ -512,7 +512,7 @@ static vinsn_vec_t vec_target_unavailable_vinsns = vinsn_vec_t (); /* Vector to store temporary nops inserted in move_op to prevent removal of empty bbs. */ -static vec vec_temp_moveop_nops = vNULL; +static vec vec_temp_moveop_nops; /* These bitmaps record original instructions scheduled on the current iteration and bookkeeping copies created by them. */ diff --git a/gcc/tree-chkp-opt.c b/gcc/tree-chkp-opt.c index 99152450e1e..6cf086c754c 100644 --- a/gcc/tree-chkp-opt.c +++ b/gcc/tree-chkp-opt.c @@ -84,7 +84,7 @@ static void chkp_collect_value (tree ssa_name, address_t &res); #define chkp_checku_fndecl \ (targetm.builtin_chkp_function (BUILT_IN_CHKP_BNDCU)) -static vec check_infos = vNULL; +static vec check_infos; /* Comparator for pol_item structures I1 and I2 to be used to find items with equal var. Also used for polynomial -- 2.30.2