diff options
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r-- | gcc/toplev.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c index 4293ac345b0..69d7026b3f4 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -3139,15 +3139,20 @@ rest_of_compilation (tree decl) have been run to re-initialize it. */ cse_not_expected = ! optimize; - /* First, make sure that NOTE_BLOCK is set correctly for each - NOTE_INSN_BLOCK_BEG/NOTE_INSN_BLOCK_END note. */ - if (!cfun->x_whole_function_mode_p) - identify_blocks (); - - /* In function-at-a-time mode, we do not attempt to keep the BLOCK - tree in sensible shape. So, we just recalculate it here. */ - if (cfun->x_whole_function_mode_p) - reorder_blocks (); + if (!cfun->dont_emit_block_notes) + { + /* First, make sure that NOTE_BLOCK is set correctly for each + NOTE_INSN_BLOCK_BEG/NOTE_INSN_BLOCK_END note. */ + if (!cfun->x_whole_function_mode_p) + identify_blocks (); + + /* In function-at-a-time mode, we do not attempt to keep the BLOCK + tree in sensible shape. So, we just recalculate it here. */ + if (cfun->x_whole_function_mode_p) + reorder_blocks (); + } + else + finalize_block_changes (); init_flow (); @@ -3175,7 +3180,8 @@ rest_of_compilation (tree decl) over the instruction sequence faster, and allow the garbage collector to reclaim the memory used by the notes. */ remove_unnecessary_notes (); - reorder_blocks (); + if (!cfun->dont_emit_block_notes) + reorder_blocks (); ggc_collect (); |