diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-07-14 22:52:50 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-07-14 22:52:50 +0000 |
commit | bf73fcf48e043c1ab310c5b7d71d618b5ca106a8 (patch) | |
tree | a329b23adcfdf2fa91cd22de7f058947cedb1b98 /gcc/toplev.c | |
parent | 10a2674d1021109b82d160661357b0a3921ddf20 (diff) | |
download | gcc-bf73fcf48e043c1ab310c5b7d71d618b5ca106a8.tar.gz |
Re-install recently reverted patch.
* emit-rtl.c (try_split): Update mark_jump_label call.
* flow.c (find_sub_basic_blocks): Likewise.
* jump.c (cross_jump_death_matters, find_cross_jump, do_cross_jump,
jump_back_p): Kill.
(mark_all_labels): Kill second parameter.
(jump_optimize, jump_optimize_1): Kill cross_jump parameter.
(rebuild_jump_labels, jump_optimize_minimal): Update call
of jump_optimize_1.
(jump_optimize_1): Kill crossjumping code.
(mark_jump_label): Kill cross_jump parameter.
* rtl.h (mark_jump_label, jump_optimize): Update prototypes.
(JUMP_CROSS_JUMP, JUMP_CROSS_JUMP_DEATH_MATTERS): Kill.
* reg-stack.c (reg_to_stack): Do not rebuild if not needed; do
splitting.
* toplev.c (enum dump_file_index): Kill DFI_jump2; put DFI_stack before
DFI_bpro.
(dump_file_info): Likewise.
(rest_of_compilation): Update calls to jump_optimize; kill jump2 pass;
reorganize passes to do reg-stack first, bb-reorder second.
* invoke.texi (-d letters doc): Remove the jump2 pass.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44008 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r-- | gcc/toplev.c | 86 |
1 files changed, 30 insertions, 56 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c index 198790e75ab..1aa880692b9 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -282,11 +282,10 @@ enum dump_file_index DFI_rnreg, DFI_ce2, DFI_sched2, + DFI_stack, DFI_bbro, - DFI_jump2, DFI_mach, DFI_dbr, - DFI_stack, DFI_MAX }; @@ -296,7 +295,7 @@ enum dump_file_index Remaining -d letters: " o q u " - " H K OPQ TUV YZ" + " H JK OPQ TUV YZ" */ struct dump_file_info dump_file[DFI_MAX] = @@ -329,11 +328,10 @@ struct dump_file_info dump_file[DFI_MAX] = { "rnreg", 'n', 1, 0, 0 }, { "ce2", 'E', 1, 0, 0 }, { "sched2", 'R', 1, 0, 0 }, + { "stack", 'k', 1, 0, 0 }, { "bbro", 'B', 1, 0, 0 }, - { "jump2", 'J', 1, 0, 0 }, { "mach", 'M', 1, 0, 0 }, { "dbr", 'd', 0, 0, 0 }, - { "stack", 'k', 1, 0, 0 }, }; static int open_dump_file PARAMS ((enum dump_file_index, tree)); @@ -2839,8 +2837,7 @@ rest_of_compilation (decl) optimize = 0; find_exception_handler_labels (); - jump_optimize (insns, !JUMP_CROSS_JUMP, !JUMP_NOOP_MOVES, - !JUMP_AFTER_REGSCAN); + jump_optimize (insns, !JUMP_NOOP_MOVES, !JUMP_AFTER_REGSCAN); optimize = saved_optimize; } @@ -2947,8 +2944,7 @@ rest_of_compilation (decl) expected_value_to_br_prob (); reg_scan (insns, max_reg_num (), 0); - jump_optimize (insns, !JUMP_CROSS_JUMP, !JUMP_NOOP_MOVES, - JUMP_AFTER_REGSCAN); + jump_optimize (insns, !JUMP_NOOP_MOVES, JUMP_AFTER_REGSCAN); timevar_pop (TV_JUMP); @@ -3090,8 +3086,7 @@ rest_of_compilation (decl) if (tem || optimize > 1) { timevar_push (TV_JUMP); - jump_optimize (insns, !JUMP_CROSS_JUMP, !JUMP_NOOP_MOVES, - !JUMP_AFTER_REGSCAN); + jump_optimize (insns, !JUMP_NOOP_MOVES, !JUMP_AFTER_REGSCAN); timevar_pop (TV_JUMP); } @@ -3163,8 +3158,7 @@ rest_of_compilation (decl) { tem = tem2 = 0; timevar_push (TV_JUMP); - jump_optimize (insns, !JUMP_CROSS_JUMP, !JUMP_NOOP_MOVES, - !JUMP_AFTER_REGSCAN); + jump_optimize (insns, !JUMP_NOOP_MOVES, !JUMP_AFTER_REGSCAN); timevar_pop (TV_JUMP); if (flag_expensive_optimizations) @@ -3237,8 +3231,7 @@ rest_of_compilation (decl) delete_trivially_dead_insns (insns, max_reg_num ()); reg_scan (insns, max_reg_num (), 0); - jump_optimize (insns, !JUMP_CROSS_JUMP, - !JUMP_NOOP_MOVES, JUMP_AFTER_REGSCAN); + jump_optimize (insns, !JUMP_NOOP_MOVES, JUMP_AFTER_REGSCAN); timevar_push (TV_IFCVT); @@ -3256,8 +3249,7 @@ rest_of_compilation (decl) if (tem) { timevar_push (TV_JUMP); - jump_optimize (insns, !JUMP_CROSS_JUMP, - !JUMP_NOOP_MOVES, !JUMP_AFTER_REGSCAN); + jump_optimize (insns, !JUMP_NOOP_MOVES, !JUMP_AFTER_REGSCAN); timevar_pop (TV_JUMP); } } @@ -3571,8 +3563,7 @@ rest_of_compilation (decl) timevar_push (TV_FLOW2); open_dump_file (DFI_flow2, decl); - jump_optimize (insns, !JUMP_CROSS_JUMP, - JUMP_NOOP_MOVES, !JUMP_AFTER_REGSCAN); + jump_optimize (insns, JUMP_NOOP_MOVES, !JUMP_AFTER_REGSCAN); find_basic_blocks (insns, max_reg_num (), rtl_dump_file); /* On some machines, the prologue and epilogue code, or parts thereof, @@ -3637,6 +3628,10 @@ rest_of_compilation (decl) close_dump_file (DFI_ce2, print_rtl_with_bb, insns); timevar_pop (TV_IFCVT2); } +#ifdef STACK_REGS + if (optimize) + split_all_insns (1); +#endif #ifdef INSN_SCHEDULING if (optimize > 0 && flag_schedule_insns_after_reload) @@ -3663,6 +3658,17 @@ rest_of_compilation (decl) = optimize > 0 && only_leaf_regs_used () && leaf_function_p (); #endif +#ifdef STACK_REGS + timevar_push (TV_REG_STACK); + open_dump_file (DFI_stack, decl); + + reg_to_stack (insns, rtl_dump_file); + + close_dump_file (DFI_stack, print_rtl, insns); + timevar_pop (TV_REG_STACK); + + ggc_collect (); +#endif if (optimize > 0 && flag_reorder_blocks) { timevar_push (TV_REORDER_BLOCKS); @@ -3671,26 +3677,10 @@ rest_of_compilation (decl) reorder_basic_blocks (); close_dump_file (DFI_bbro, print_rtl_with_bb, insns); + cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_POST_REGSTACK); timevar_pop (TV_REORDER_BLOCKS); } - /* One more attempt to remove jumps to .+1 left by dead-store elimination. - Also do cross-jumping this time and delete no-op move insns. */ - - if (optimize > 0) - { - timevar_push (TV_JUMP); - open_dump_file (DFI_jump2, decl); - - jump_optimize (insns, JUMP_CROSS_JUMP, JUMP_NOOP_MOVES, - !JUMP_AFTER_REGSCAN); - - /* CFG no longer kept up to date. */ - - close_dump_file (DFI_jump2, print_rtl, insns); - timevar_pop (TV_JUMP); - } - /* If a machine dependent reorganization is needed, call it. */ #ifdef MACHINE_DEPENDENT_REORG open_dump_file (DFI_mach, decl); @@ -3702,6 +3692,8 @@ rest_of_compilation (decl) ggc_collect (); #endif + /* CFG no longer kept up to date. */ + /* If a scheduling pass for delayed branches is to be done, call the scheduling code. */ @@ -3720,28 +3712,10 @@ rest_of_compilation (decl) } #endif +#if defined (HAVE_ATTR_length) && !defined (STACK_REGS) timevar_push (TV_SHORTEN_BRANCH); - if (0 -#ifdef HAVE_ATTR_length - || 1 -#endif -#ifdef STACK_REGS - || 1 -#endif - ) - split_all_insns (0); + split_all_insns (0); timevar_pop (TV_SHORTEN_BRANCH); - -#ifdef STACK_REGS - timevar_push (TV_REG_STACK); - open_dump_file (DFI_stack, decl); - - reg_to_stack (insns, rtl_dump_file); - - close_dump_file (DFI_stack, print_rtl, insns); - timevar_pop (TV_REG_STACK); - - ggc_collect (); #endif convert_to_eh_region_ranges (); |