From 19d3c25c9a4da9526a2012b47d14bc731fd0422e Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 28 Jan 2000 14:22:50 -0800 Subject: flow.c (find_basic_blocks): Remove do_cleanup argument. * flow.c (find_basic_blocks): Remove do_cleanup argument. Break out that code ... (cleanup_cfg): ... here. (commit_one_edge_insertion): Detect a return instruction being emitted to an edge. Emit a barrier following; clear fallthru. (commit_edge_insertions): Verify CFG consistency. * function.c (expand_function_start): Kill unused variable. (expand_function_end): Likewise. (thread_prologue_and_epilogue_insns): Use insert_insn_on_edge to insert the epilogue. * gcse.c (gcse_main): Adjust for find_basic_blocks change. (delete_null_pointer_checks): Likewise. * output.h: Likewise. * reg-stack.c (reg_to_stack): Likewise. * toplev.c (rest_of_compilation): Likewise. Run thread_prologue_and_epilogue_insns after rebuilding the CFG. From-SVN: r31676 --- gcc/toplev.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'gcc/toplev.c') diff --git a/gcc/toplev.c b/gcc/toplev.c index 189c3e7..136d966 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -3216,7 +3216,8 @@ rest_of_compilation (decl) TIMEVAR (flow_time, { - find_basic_blocks (insns, max_reg_num (), rtl_dump_file, 1); + find_basic_blocks (insns, max_reg_num (), rtl_dump_file); + cleanup_cfg (insns); if (optimize) calculate_loop_depth (rtl_dump_file); life_analysis (insns, max_reg_num (), rtl_dump_file, 1); @@ -3384,13 +3385,6 @@ rest_of_compilation (decl) if (rebuild_label_notes_after_reload) TIMEVAR (jump_time, rebuild_jump_labels (insns)); - /* On some machines, the prologue and epilogue code, or parts thereof, - can be represented as RTL. Doing so lets us schedule insns between - it and the rest of the code and also allows delayed branch - scheduling to operate in the epilogue. */ - - thread_prologue_and_epilogue_insns (insns); - /* If optimizing and we are performing instruction scheduling after reload, then go ahead and split insns now since we are about to recompute flow information anyway. @@ -3412,12 +3406,23 @@ rest_of_compilation (decl) if (flow2_dump) open_dump_file (".14.flow2", decl_printable_name (decl, 2)); + TIMEVAR (flow2_time, + { + find_basic_blocks (insns, max_reg_num (), rtl_dump_file); + }); + + /* On some machines, the prologue and epilogue code, or parts thereof, + can be represented as RTL. Doing so lets us schedule insns between + it and the rest of the code and also allows delayed branch + scheduling to operate in the epilogue. */ + thread_prologue_and_epilogue_insns (insns); + if (optimize) { TIMEVAR (flow2_time, { - find_basic_blocks (insns, max_reg_num (), rtl_dump_file, 1); + cleanup_cfg (insns); life_analysis (insns, max_reg_num (), rtl_dump_file, 1); }); -- cgit v1.1