From 1ea463a273df44816d63c3f96292341668a88ef0 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Thu, 1 Jul 2004 01:00:47 -0700 Subject: [PATCH] function.h (struct function): Remove dont_emit_block_notes. * function.h (struct function): Remove dont_emit_block_notes. * gimple-low.c (lower_function_body): Don't set it. * cfgexpand.c (expand_block): Don't check it. * cfglayout.c (insn_locators_initialize): Likewise. * expr.c (expand_expr_real, expand_expr_real_1): Likewise. * passes.c (rest_of_compilation): Likewise. * stmt.c (expand_start_bindings_and_block): Likewise. (expand_end_bindings): Likewise. From-SVN: r83959 --- gcc/ChangeLog | 11 +++++++++++ gcc/cfgexpand.c | 3 +-- gcc/cfglayout.c | 20 ++++---------------- gcc/expr.c | 6 ++---- gcc/function.h | 4 ---- gcc/gimple-low.c | 2 -- gcc/passes.c | 11 +---------- gcc/stmt.c | 21 +++++---------------- 8 files changed, 24 insertions(+), 54 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index dcd3ea7559b..5b78d22c765 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +2004-07-01 Richard Henderson + + * function.h (struct function): Remove dont_emit_block_notes. + * gimple-low.c (lower_function_body): Don't set it. + * cfgexpand.c (expand_block): Don't check it. + * cfglayout.c (insn_locators_initialize): Likewise. + * expr.c (expand_expr_real, expand_expr_real_1): Likewise. + * passes.c (rest_of_compilation): Likewise. + * stmt.c (expand_start_bindings_and_block): Likewise. + (expand_end_bindings): Likewise. + 2004-07-01 Richard Henderson * cgraph.h (cgraph_build_static_cdtor): Declare. diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index c6505767c66..4227b985f3d 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -119,8 +119,7 @@ expand_block (basic_block bb, FILE * dump_file) if (EXPR_LOCUS (stmt)) { emit_line_note (*(EXPR_LOCUS (stmt))); - if (cfun->dont_emit_block_notes) - record_block_change (TREE_BLOCK (stmt)); + record_block_change (TREE_BLOCK (stmt)); } /* These flags have no purpose in RTL land. */ diff --git a/gcc/cfglayout.c b/gcc/cfglayout.c index be890d9b399..3fb23992acf 100644 --- a/gcc/cfglayout.c +++ b/gcc/cfglayout.c @@ -308,19 +308,9 @@ insn_locators_initialize (void) switch (NOTE_LINE_NUMBER (insn)) { case NOTE_INSN_BLOCK_BEG: - if (cfun->dont_emit_block_notes) - abort (); - block = NOTE_BLOCK (insn); - delete_insn (insn); - break; case NOTE_INSN_BLOCK_END: - if (cfun->dont_emit_block_notes) - abort (); - block = BLOCK_SUPERCONTEXT (block); - if (block && TREE_CODE (block) == FUNCTION_DECL) - block = 0; - delete_insn (insn); - break; + abort (); + default: if (NOTE_LINE_NUMBER (insn) > 0) { @@ -333,16 +323,14 @@ insn_locators_initialize (void) } } - if (cfun->dont_emit_block_notes) - check_block_change (insn, &block); + check_block_change (insn, &block); } /* Tag the blocks with a depth number so that change_scope can find the common parent easily. */ set_block_levels (DECL_INITIAL (cfun->decl), 0); - if (cfun->dont_emit_block_notes) - free_block_changes (); + free_block_changes (); } /* For each lexical block, set BLOCK_NUMBER to the depth at which it is diff --git a/gcc/expr.c b/gcc/expr.c index d67e6ee3fd6..308f47c04b5 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -6490,8 +6490,7 @@ expand_expr_real (tree exp, rtx target, enum machine_mode tmode, emit_line_note (input_location); /* Record where the insns produced belong. */ - if (cfun->dont_emit_block_notes) - record_block_change (TREE_BLOCK (exp)); + record_block_change (TREE_BLOCK (exp)); ret = expand_expr_real_1 (exp, target, tmode, modifier, alt_rtl); @@ -8534,8 +8533,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, if (EXPR_HAS_LOCATION (exp)) { emit_line_note (EXPR_LOCATION (exp)); - if (cfun->dont_emit_block_notes) - record_block_change (TREE_BLOCK (exp)); + record_block_change (TREE_BLOCK (exp)); } expand_elseif (TREE_OPERAND (exp, 0)); expand_expr (TREE_OPERAND (exp, 1), const0_rtx, VOIDmode, 0); diff --git a/gcc/function.h b/gcc/function.h index 39dde5335e8..7d8394b5123 100644 --- a/gcc/function.h +++ b/gcc/function.h @@ -361,10 +361,6 @@ struct function GTY(()) delay list for them is recorded here. */ rtx epilogue_delay_list; - /* Nonzero if NOTE_INSN_BLOCK_BEG / NOTE_INSN_BLOCK_END notes should not - be emitted. */ - unsigned int dont_emit_block_notes : 1; - /* How commonly executed the function is. Initialized during branch probabilities pass. */ enum function_frequency { diff --git a/gcc/gimple-low.c b/gcc/gimple-low.c index f5ee15bdd3b..67b7f2d16ee 100644 --- a/gcc/gimple-low.c +++ b/gcc/gimple-low.c @@ -124,8 +124,6 @@ lower_function_body (void) clear_block_marks (data.block); - /* Avoid producing notes for blocks. */ - cfun->dont_emit_block_notes = 1; reset_block_changes (); } diff --git a/gcc/passes.c b/gcc/passes.c index 8ed0f305449..df1c5bd372b 100644 --- a/gcc/passes.c +++ b/gcc/passes.c @@ -1374,14 +1374,7 @@ rest_of_compilation (void) have been run to re-initialize it. */ cse_not_expected = ! optimize; - if (!cfun->dont_emit_block_notes) - { - /* In function-at-a-time mode, we do not attempt to keep the BLOCK - tree in sensible shape. So, we just recalculate it here. */ - reorder_blocks (); - } - else - finalize_block_changes (); + finalize_block_changes (); /* Dump the rtl code if we are dumping rtl. */ if (open_dump_file (DFI_rtl, current_function_decl)) @@ -1413,8 +1406,6 @@ rest_of_compilation (void) over the instruction sequence faster, and allow the garbage collector to reclaim the memory used by the notes. */ remove_unnecessary_notes (); - if (!cfun->dont_emit_block_notes) - reorder_blocks (); ggc_collect (); diff --git a/gcc/stmt.c b/gcc/stmt.c index a1520e49585..5c8a6e8af9c 100644 --- a/gcc/stmt.c +++ b/gcc/stmt.c @@ -2840,13 +2840,7 @@ expand_start_bindings_and_block (int flags, tree block) abort (); /* Create a note to mark the beginning of the block. */ - if (block_flag && !cfun->dont_emit_block_notes) - { - note = emit_note (NOTE_INSN_BLOCK_BEG); - NOTE_BLOCK (note) = block; - } - else - note = emit_note (NOTE_INSN_DELETED); + note = emit_note (NOTE_INSN_DELETED); /* Make an entry on block_stack for the block we are entering. */ @@ -3073,7 +3067,8 @@ warn_about_unused_variables (tree vars) labels (because the front end does that). */ void -expand_end_bindings (tree vars, int mark_ends, int dont_jump_in) +expand_end_bindings (tree vars, int mark_ends ATTRIBUTE_UNUSED, + int dont_jump_in) { struct nesting *thisblock = block_stack; @@ -3165,14 +3160,8 @@ expand_end_bindings (tree vars, int mark_ends, int dont_jump_in) We do this now, after running cleanups on the variables just going out of scope, so they are in scope for their cleanups. */ - if (mark_ends && !cfun->dont_emit_block_notes) - { - rtx note = emit_note (NOTE_INSN_BLOCK_END); - NOTE_BLOCK (note) = NOTE_BLOCK (thisblock->data.block.first_insn); - } - else - /* Get rid of the beginning-mark if we don't make an end-mark. */ - NOTE_LINE_NUMBER (thisblock->data.block.first_insn) = NOTE_INSN_DELETED; + /* Get rid of the beginning-mark if we don't make an end-mark. */ + NOTE_LINE_NUMBER (thisblock->data.block.first_insn) = NOTE_INSN_DELETED; /* Restore the temporary level of TARGET_EXPRs. */ target_temp_slot_level = thisblock->data.block.block_target_temp_slot_level; -- 2.30.2