This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi, > Hello there, > > I just had a look at the source code of gcc version 4.5 snapshot 20091112 > and here is part two of removing some set but not used variables. > I have just bootstrapped this slight variant (only tweaked cfgrtl.c), on x86_64-linux, currently testing C/C++. Is it straightforward enough to go in if regtesting passes? Paolo. ///////////////////
Attachment:
CL97_
Description: Text document
Index: toplev.c =================================================================== --- toplev.c (revision 154493) +++ toplev.c (working copy) @@ -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 (); Index: dominance.c =================================================================== --- dominance.c (revision 154493) +++ dominance.c (working copy) @@ -739,7 +739,6 @@ set_immediate_dominator (enum cdi_direction dir, b 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_bl 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; Index: dwarf2out.c =================================================================== --- dwarf2out.c (revision 154493) +++ dwarf2out.c (working copy) @@ -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 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_r 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_r = 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); Index: emit-rtl.c =================================================================== --- emit-rtl.c (revision 154493) +++ emit-rtl.c (working copy) @@ -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 @@ void 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; Index: rtl.h =================================================================== --- rtl.h (revision 154493) +++ rtl.h (working copy) @@ -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); Index: cfgrtl.c =================================================================== --- cfgrtl.c (revision 154493) +++ cfgrtl.c (working copy) @@ -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))
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |