else
finalize_block_changes ();
- init_flow ();
-
/* Dump the rtl code if we are dumping rtl. */
if (open_dump_file (DFI_rtl, current_function_decl))
close_dump_file (DFI_rtl, print_rtl, get_insns ());
timevar_push (TV_JUMP);
open_dump_file (DFI_sibling, current_function_decl);
- rebuild_jump_labels (get_insns ());
- find_exception_handler_labels ();
- find_basic_blocks (get_insns (), max_reg_num (), dump_file);
+ /* ??? We may get called either via tree_rest_of_compilation when the CFG
+ is already built or directly (for instance from coverage code).
+ The direct callers shall be updated. */
+ if (!basic_block_info)
+ {
+ init_flow ();
+ rebuild_jump_labels (get_insns ());
+ find_exception_handler_labels ();
+ find_basic_blocks (get_insns (), max_reg_num (), dump_file);
+ }
delete_unreachable_blocks ();
+#ifdef ENABLE_CHECKING
+ verify_flow_info();
+#endif
/* Turn NOTE_INSN_PREDICTIONs into branch predictions. */
if (flag_guess_branch_prob)
if (flag_guess_branch_prob)
expected_value_to_br_prob ();
- reg_scan (get_insns (), max_reg_num (), 0);
- rebuild_jump_labels (get_insns ());
- find_basic_blocks (get_insns (), max_reg_num (), dump_file);
delete_trivially_dead_insns (get_insns (), max_reg_num ());
+ reg_scan (get_insns(), max_reg_num (), 0);
if (dump_file)
dump_flow_info (dump_file);
cleanup_cfg ((optimize ? CLEANUP_EXPENSIVE : 0) | CLEANUP_PRE_LOOP