aboutsummaryrefslogtreecommitdiff
path: root/gcc/toplev.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2001-07-23 16:08:12 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2001-07-23 14:08:12 +0000
commit0005550b5832aa6f0a3d7f343319c6b5b327dde8 (patch)
tree3dbb57e04c149a6d0f4908ed9c0351fc46670790 /gcc/toplev.c
parent4edc91ae51a40b656c11d7dffbe74692be8d755e (diff)
downloadgcc-0005550b5832aa6f0a3d7f343319c6b5b327dde8.zip
gcc-0005550b5832aa6f0a3d7f343319c6b5b327dde8.tar.gz
gcc-0005550b5832aa6f0a3d7f343319c6b5b327dde8.tar.bz2
basic-block.h (find_sub_basic_block): Declare.
* basic-block.h (find_sub_basic_block): Declare. * flow.c (make_edges): New arguments MIN and MAX; (find_sub_basic_blocks): Revamp to use make_edges and purge_dead_edges. (find_basic_blocks): Update call of find_sub_basic_block. * recog.c (split_all_insns): Always expect CFG to be consistent; call find_sub_basic_blocks in case something has changed. * toplev.c (rest_of_compilation): Always call split_all_insns once CFG has been built. * basic-block.h (delete_noop_moves): Declare. * combine.c (combine_instructions): Call it. (recog_for_combine): Tolerate noop moves (distribute_notes): Force refresh when register dies at noop move. * flow.c (delete_noop_moves): Use BB structure; delete JUMP insns too. (life_analysis): Update delete_noop_moves call. (set_noop_p): Move too ... * rtlanal.c (noop_move_p): ... here. * rtl.h (noop_move_p): Declare. * basic-block.h (purge_all_dead_edges, purge_dead_edges): New functions. * toplev.c (rest_of_compilation): Conditionally call purge_all_dead_edges after combine. * gcse.c (cprop_cc0_jump, cprop_insn): New argument "basic_block". (cprop_jump): Likewise; call purge_dead_edges if substitution suceeded. From-SVN: r44267
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r--gcc/toplev.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 13a5d05..613ef0d 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -3265,7 +3265,7 @@ rest_of_compilation (decl)
timevar_pop (TV_JUMP);
timevar_push (TV_FLOW);
- find_basic_blocks (insns, max_reg_num (), rtl_dump_file);
+ purge_all_dead_edges ();
cleanup_cfg (CLEANUP_EXPENSIVE);
/* Blimey. We've got to have the CFG up to date for the call to
@@ -3441,16 +3441,6 @@ rest_of_compilation (decl)
timevar_pop (TV_RELOAD_CSE_REGS);
}
- /* If optimizing, then go ahead and split insns now since we are about
- to recompute flow information anyway. */
- if (optimize > 0)
- {
- int old_labelnum = max_label_num ();
-
- split_all_insns (0);
- rebuild_label_notes_after_reload |= old_labelnum != max_label_num ();
- }
-
/* Register allocation and reloading may have turned an indirect jump into
a direct jump. If so, we must rebuild the JUMP_LABEL fields of
jumping instructions. */
@@ -3470,6 +3460,11 @@ rest_of_compilation (decl)
open_dump_file (DFI_flow2, decl);
find_basic_blocks (insns, max_reg_num (), rtl_dump_file);
+
+ /* If optimizing, then go ahead and split insns now. */
+ if (optimize > 0)
+ split_all_insns (0);
+
cleanup_cfg (0);
/* On some machines, the prologue and epilogue code, or parts thereof,