From 01703575a5da42c37f098e8de64d822277b97118 Mon Sep 17 00:00:00 2001 From: paolo Date: Tue, 24 Nov 2009 12:59:00 +0000 Subject: [PATCH] 2009-11-24 David Binderman * cfgrtl.c (commit_one_edge_insertion): Remove set but not used local variable bb_note. * dominance.c (get_dominated_by): Likewise local var n. (output_file_names): Likewise local var idx. (add_location_or_const_value_attribute): Likewise local var status. * dwarf2out.c (gen_variable_die): Likewise local var field. * emit-rtl.c (no_line_numbers): Remove. (init_emit_once): Remove line_numbers parameter. * rtl.h (init_emit_once): Adjust prototype. * toplev.c (backend_init): Adjust init_emit_once call. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154496 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 13 +++++++++++++ gcc/cfgrtl.c | 8 ++------ gcc/dominance.c | 3 +-- gcc/dwarf2out.c | 7 +------ gcc/emit-rtl.c | 11 ++--------- gcc/rtl.h | 2 +- gcc/toplev.c | 8 +------- 7 files changed, 21 insertions(+), 31 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e13a3b2..87eed98 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,16 @@ +2009-11-24 David Binderman + + * cfgrtl.c (commit_one_edge_insertion): Remove set but not used + local variable bb_note. + * dominance.c (get_dominated_by): Likewise local var n. + (output_file_names): Likewise local var idx. + (add_location_or_const_value_attribute): Likewise local var status. + * dwarf2out.c (gen_variable_die): Likewise local var field. + * emit-rtl.c (no_line_numbers): Remove. + (init_emit_once): Remove line_numbers parameter. + * rtl.h (init_emit_once): Adjust prototype. + * toplev.c (backend_init): Adjust init_emit_once call. + 2009-11-24 Richard Guenther PR tree-optimization/42142 diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index 73aebf0..71c1540 100644 --- a/gcc/cfgrtl.c +++ b/gcc/cfgrtl.c @@ -1506,16 +1506,12 @@ commit_one_edge_insertion (edge e) && BB_PARTITION (e->src) == BB_COLD_PARTITION && !(e->flags & EDGE_CROSSING)) { - rtx bb_note, cur_insn; + rtx cur_insn; - bb_note = NULL_RTX; for (cur_insn = BB_HEAD (bb); cur_insn != NEXT_INSN (BB_END (bb)); cur_insn = NEXT_INSN (cur_insn)) if (NOTE_INSN_BASIC_BLOCK_P (cur_insn)) - { - bb_note = cur_insn; - break; - } + break; if (JUMP_P (BB_END (bb)) && !any_condjump_p (BB_END (bb)) diff --git a/gcc/dominance.c b/gcc/dominance.c index 2cc1414..78ad48c 100644 --- a/gcc/dominance.c +++ b/gcc/dominance.c @@ -739,7 +739,6 @@ set_immediate_dominator (enum cdi_direction dir, basic_block bb, VEC (basic_block, heap) * get_dominated_by (enum cdi_direction dir, basic_block bb) { - int n; unsigned int dir_index = dom_convert_dir_to_idx (dir); struct et_node *node = bb->dom[dir_index], *son = node->son, *ason; VEC (basic_block, heap) *bbs = NULL; @@ -750,7 +749,7 @@ get_dominated_by (enum cdi_direction dir, basic_block bb) return NULL; VEC_safe_push (basic_block, heap, bbs, (basic_block) son->data); - for (ason = son->right, n = 1; ason != son; ason = ason->right) + for (ason = son->right; ason != son; ason = ason->right) VEC_safe_push (basic_block, heap, bbs, (basic_block) ason->data); return bbs; diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 0394114..25b5fdc 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -11261,7 +11261,6 @@ output_file_names (void) int ndirs; int idx_offset; int i; - int idx; if (!last_emitted_file) { @@ -11388,7 +11387,6 @@ output_file_names (void) } /* Emit the directory name table. */ - idx = 1; idx_offset = dirs[0].length > 0 ? 1 : 0; for (i = 1 - idx_offset; i < ndirs; i++) dw2_asm_output_nstring (dirs[i].path, @@ -15721,11 +15719,10 @@ add_location_or_const_value_attribute (dw_die_ref die, tree decl, loc_list = lookup_decl_loc (decl); if (loc_list && loc_list->first && loc_list->first == loc_list->last) { - enum var_init_status status; struct var_loc_node *node; node = loc_list->first; - status = NOTE_VAR_LOCATION_STATUS (node->var_loc_note); + NOTE_VAR_LOCATION_STATUS (node->var_loc_note); rtl = NOTE_VAR_LOCATION (node->var_loc_note); if (GET_CODE (rtl) == VAR_LOCATION && GET_CODE (XEXP (rtl, 1)) != PARALLEL) @@ -17962,7 +17959,6 @@ gen_variable_die (tree decl, tree origin, dw_die_ref context_die) of a data member. */ if (com_decl) { - tree field; dw_die_ref com_die; dw_loc_list_ref loc; die_node com_die_arg; @@ -18000,7 +17996,6 @@ gen_variable_die (tree decl, tree origin, dw_die_ref context_die) = htab_create_ggc (10, common_block_die_table_hash, common_block_die_table_eq, NULL); - field = TREE_OPERAND (DECL_VALUE_EXPR (decl), 0); com_die_arg.decl_id = DECL_UID (com_decl); com_die_arg.die_parent = context_die; com_die = (dw_die_ref) htab_find (common_block_die_table, &com_die_arg); diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 674bcc4..6ef490e 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -84,10 +84,6 @@ rtx * regno_reg_rtx; static GTY(()) int label_num = 1; -/* Nonzero means do not generate NOTEs for source line numbers. */ - -static int no_line_numbers; - /* Commonly used rtx's, so that we only need space for one copy. These are initialized once for the entire compilation. All of these are unique; no other rtx-object will be equal to any @@ -5714,11 +5710,10 @@ init_emit_regs (void) pic_offset_table_rtx = NULL_RTX; } -/* Create some permanent unique rtl objects shared between all functions. - LINE_NUMBERS is nonzero if line numbers are to be generated. */ +/* Create some permanent unique rtl objects shared between all functions. */ void -init_emit_once (int line_numbers) +init_emit_once (void) { int i; enum machine_mode mode; @@ -5740,8 +5735,6 @@ init_emit_once (int line_numbers) reg_attrs_htab = htab_create_ggc (37, reg_attrs_htab_hash, reg_attrs_htab_eq, NULL); - no_line_numbers = ! line_numbers; - /* Compute the word and byte modes. */ byte_mode = VOIDmode; diff --git a/gcc/rtl.h b/gcc/rtl.h index 7cf3a7f..a44c59c 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -2224,7 +2224,7 @@ extern int in_sequence_p (void); extern void force_next_line_note (void); extern void init_emit (void); extern void init_emit_regs (void); -extern void init_emit_once (int); +extern void init_emit_once (void); extern void push_topmost_sequence (void); extern void pop_topmost_sequence (void); extern void set_new_first_and_last_insn (rtx, rtx); diff --git a/gcc/toplev.c b/gcc/toplev.c index 92e4835..44f10d6 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -2182,13 +2182,7 @@ backend_init_target (void) static void backend_init (void) { - init_emit_once (debug_info_level == DINFO_LEVEL_NORMAL - || debug_info_level == DINFO_LEVEL_VERBOSE -#ifdef VMS_DEBUGGING_INFO - /* Enable line number info for traceback. */ - || debug_info_level > DINFO_LEVEL_NONE -#endif - || flag_test_coverage); + init_emit_once (); init_rtlanal (); init_inline_once (); -- 2.7.4