diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8fb3efe1151..1926e4de177 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +Tue Jul 24 20:32:44 CEST 2001 Jan Hubicka + + * recog.c (split_all_insns_noflow): New. + * rtl.h (split_all_insns_noflow): Declare. + * ia64.c (ia64_reorg): Use split_all_insns_noflow. + * m68hc11.c (m68hc11_reorg): Likewise. + * sh.c (machine_dependent_reorg): Likewise. + * toplev.c (rest_of_compilation): Likewise for last split_all_insns + call. + 2001-07-18 Andrew Haley * config/sh/sh.md (ashlsi3_std splitter): Split only after reload. diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index 63181c755f4..be2c04dfae3 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -6457,7 +6457,7 @@ ia64_reorg (insns) { /* If optimizing, we'll have split before scheduling. */ if (optimize == 0) - split_all_insns (0); + split_all_insns_noflow (); /* Make sure the CFG and global_live_at_start are correct for emit_predicate_relation_info. */ diff --git a/gcc/config/m68hc11/m68hc11.c b/gcc/config/m68hc11/m68hc11.c index da7f490a587..119d8ee5e51 100644 --- a/gcc/config/m68hc11/m68hc11.c +++ b/gcc/config/m68hc11/m68hc11.c @@ -4803,7 +4803,7 @@ m68hc11_reorg (first) /* Force a split of all splitable insn. This is necessary for the Z register replacement mechanism because we end up with basic insns. */ - split_all_insns (0); + split_all_insns_noflow (); split_done = 1; z_replacement_completed = 1; @@ -4850,7 +4850,7 @@ m68hc11_reorg (first) split after Z register replacement. This gives more opportunities for peephole (in particular for consecutives xgdx/xgdy). */ if (optimize > 0) - split_all_insns (0); + split_all_insns_noflow (); /* Once insns are split after the z_replacement_completed == 2, we must not re-run the life_analysis. The xgdx/xgdy patterns diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index a9813697501..87b5be9ee9e 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -3027,7 +3027,7 @@ machine_dependent_reorg (first) optimizing, they'll have already been split. Otherwise, make sure we don't split them too late. */ if (! optimize) - split_all_insns (0); + split_all_insns_noflow (); /* If relaxing, generate pseudo-ops to associate function calls with the symbols they call. It does no harm to not generate these diff --git a/gcc/recog.c b/gcc/recog.c index b4b9b9d5bc2..c77bc4263bd 100644 --- a/gcc/recog.c +++ b/gcc/recog.c @@ -2777,6 +2777,22 @@ split_all_insns (upd_life) sbitmap_free (blocks); } + +/* Same as split_all_insns, but do not expect CFG to be available. + Used by machine depedent reorg passes. */ + +void +split_all_insns_noflow () +{ + rtx next, insn; + + for (insn = get_insns (); insn; insn = next) + { + next = NEXT_INSN (insn); + split_insn (insn); + } + return; +} #ifdef HAVE_peephole2 struct peep2_insn_data diff --git a/gcc/rtl.h b/gcc/rtl.h index 278e9d06976..1fbc9da59a3 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -1462,6 +1462,7 @@ extern enum reg_class reg_alternate_class PARAMS ((int)); extern rtx get_first_nonparm_insn PARAMS ((void)); extern void split_all_insns PARAMS ((int)); +extern void split_all_insns_noflow PARAMS ((void)); #define MAX_SAVED_CONST_INT 64 extern rtx const_int_rtx[MAX_SAVED_CONST_INT * 2 + 1]; diff --git a/gcc/toplev.c b/gcc/toplev.c index 613ef0da17a..a7bd5e36daf 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -3459,7 +3459,9 @@ rest_of_compilation (decl) timevar_push (TV_FLOW2); open_dump_file (DFI_flow2, decl); - find_basic_blocks (insns, max_reg_num (), rtl_dump_file); +#ifdef ENABLE_CHECKING + verify_flow_info (); +#endif /* If optimizing, then go ahead and split insns now. */ if (optimize > 0) @@ -3473,6 +3475,8 @@ rest_of_compilation (decl) scheduling to operate in the epilogue. */ thread_prologue_and_epilogue_insns (insns); + compute_bb_for_insn (get_max_uid ()); + if (optimize) { cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_CROSSJUMP); @@ -3624,7 +3628,7 @@ rest_of_compilation (decl) #if defined (HAVE_ATTR_length) && !defined (STACK_REGS) timevar_push (TV_SHORTEN_BRANCH); - split_all_insns (0); + split_all_insns_noflow (); timevar_pop (TV_SHORTEN_BRANCH); #endif