Commit 0045d504 by Jan Hubicka Committed by Jan Hubicka

jump.c: Update comments.

	* jump.c: Update comments.
	(delete_barrier_successors, delete_unreferenced_labels,
	delete_noop_moves, tension_vector_labels, delete_from_jump_chain,
	delete_labelref_insn, redirect_tablejump, jump_optimize_1,
	jump_optimize, jump_optimize_minimal): Kill.
	(rebuild_jump_labels): Move code from jump_optimize_1.
	(purge_line_number_notes): Likewise.
	(copy_loop_headers): Likewise.
	* reg-stack.c: Update comment.
	* stmt.c: Likewise.
	* rtl.h (jump_optimize, jump_optimize_1, JUMP_NOOP_MOVES,
	JUMP_AFTER_REGSCAN): Kill.
	* toplev.c (rest_of_compilation): Use cleanup_cfg, call
	purge_line_number_notes and copy_loop_headers.

From-SVN: r44245
parent 3914abb4
Sun Jul 22 21:31:04 CEST 2001 Jan Hubicka <jh@suse.cz>
* jump.c: Update comments.
(delete_barrier_successors, delete_unreferenced_labels,
delete_noop_moves, tension_vector_labels, delete_from_jump_chain,
delete_labelref_insn, redirect_tablejump, jump_optimize_1,
jump_optimize, jump_optimize_minimal): Kill.
(rebuild_jump_labels): Move code from jump_optimize_1.
(purge_line_number_notes): Likewise.
(copy_loop_headers): Likewise.
* reg-stack.c: Update comment.
* stmt.c: Likewise.
* rtl.h (jump_optimize, jump_optimize_1, JUMP_NOOP_MOVES,
JUMP_AFTER_REGSCAN): Kill.
* toplev.c (rest_of_compilation): Use cleanup_cfg, call
purge_line_number_notes and copy_loop_headers.
2001-07-22 Neil Booth <neil@daikokuya.demon.co.uk> 2001-07-22 Neil Booth <neil@daikokuya.demon.co.uk>
Richard Henderson <rth@redhat.com> Richard Henderson <rth@redhat.com>
......
...@@ -406,7 +406,7 @@ pop_stack (regstack, regno) ...@@ -406,7 +406,7 @@ pop_stack (regstack, regno)
dump file, if used. dump file, if used.
Construct a CFG and run life analysis. Then convert each insn one Construct a CFG and run life analysis. Then convert each insn one
by one. Run a last jump_optimize pass, if optimizing, to eliminate by one. Run a last cleanup_cfg pass, if optimizing, to eliminate
code duplication created when the converter inserts pop insns on code duplication created when the converter inserts pop insns on
the edges. */ the edges. */
......
...@@ -1715,8 +1715,6 @@ extern int rtx_renumbered_equal_p PARAMS ((rtx, rtx)); ...@@ -1715,8 +1715,6 @@ extern int rtx_renumbered_equal_p PARAMS ((rtx, rtx));
extern int true_regnum PARAMS ((rtx)); extern int true_regnum PARAMS ((rtx));
extern int redirect_jump_1 PARAMS ((rtx, rtx)); extern int redirect_jump_1 PARAMS ((rtx, rtx));
extern int redirect_jump PARAMS ((rtx, rtx, int)); extern int redirect_jump PARAMS ((rtx, rtx, int));
extern void jump_optimize PARAMS ((rtx, int, int));
extern void jump_optimize_minimal PARAMS ((rtx));
extern void rebuild_jump_labels PARAMS ((rtx)); extern void rebuild_jump_labels PARAMS ((rtx));
extern void thread_jumps PARAMS ((rtx, int, int)); extern void thread_jumps PARAMS ((rtx, int, int));
extern int rtx_equal_for_thread_p PARAMS ((rtx, rtx, rtx)); extern int rtx_equal_for_thread_p PARAMS ((rtx, rtx, rtx));
...@@ -1727,10 +1725,8 @@ extern enum rtx_code reversed_comparison_code_parts PARAMS ((enum rtx_code, ...@@ -1727,10 +1725,8 @@ extern enum rtx_code reversed_comparison_code_parts PARAMS ((enum rtx_code,
extern void delete_for_peephole PARAMS ((rtx, rtx)); extern void delete_for_peephole PARAMS ((rtx, rtx));
extern int condjump_in_parallel_p PARAMS ((rtx)); extern int condjump_in_parallel_p PARAMS ((rtx));
extern void never_reached_warning PARAMS ((rtx)); extern void never_reached_warning PARAMS ((rtx));
extern void purge_line_number_notes PARAMS ((rtx));
/* Flags for jump_optimize() */ extern void copy_loop_headers PARAMS ((rtx));
#define JUMP_NOOP_MOVES 1
#define JUMP_AFTER_REGSCAN 1
/* In emit-rtl.c. */ /* In emit-rtl.c. */
extern int max_reg_num PARAMS ((void)); extern int max_reg_num PARAMS ((void));
......
...@@ -3467,7 +3467,7 @@ expand_nl_handler_label (slot, before_insn) ...@@ -3467,7 +3467,7 @@ expand_nl_handler_label (slot, before_insn)
rtx insns; rtx insns;
rtx handler_label = gen_label_rtx (); rtx handler_label = gen_label_rtx ();
/* Don't let jump_optimize delete the handler. */ /* Don't let cleanup_cfg delete the handler. */
LABEL_PRESERVE_P (handler_label) = 1; LABEL_PRESERVE_P (handler_label) = 1;
start_sequence (); start_sequence ();
......
...@@ -2774,7 +2774,7 @@ rest_of_compilation (decl) ...@@ -2774,7 +2774,7 @@ rest_of_compilation (decl)
purge_hard_subreg_sets (get_insns ()); purge_hard_subreg_sets (get_insns ());
emit_initial_value_sets (); emit_initial_value_sets ();
/* Don't return yet if -Wreturn-type; we need to do jump_optimize. */ /* Don't return yet if -Wreturn-type; we need to do cleanup_cfg. */
if ((rtl_dump_and_exit || flag_syntax_only) && !warn_return_type) if ((rtl_dump_and_exit || flag_syntax_only) && !warn_return_type)
goto exit_rest_of_compilation; goto exit_rest_of_compilation;
...@@ -2839,7 +2839,11 @@ rest_of_compilation (decl) ...@@ -2839,7 +2839,11 @@ rest_of_compilation (decl)
expected_value_to_br_prob (); expected_value_to_br_prob ();
reg_scan (insns, max_reg_num (), 0); reg_scan (insns, max_reg_num (), 0);
jump_optimize (insns, !JUMP_NOOP_MOVES, JUMP_AFTER_REGSCAN); rebuild_jump_labels (insns);
find_basic_blocks (insns, max_reg_num (), rtl_dump_file);
cleanup_cfg (optimize ? CLEANUP_EXPENSIVE : 0);
copy_loop_headers (insns);
purge_line_number_notes (insns);
timevar_pop (TV_JUMP); timevar_pop (TV_JUMP);
...@@ -2981,7 +2985,9 @@ rest_of_compilation (decl) ...@@ -2981,7 +2985,9 @@ rest_of_compilation (decl)
if (tem || optimize > 1) if (tem || optimize > 1)
{ {
timevar_push (TV_JUMP); timevar_push (TV_JUMP);
jump_optimize (insns, !JUMP_NOOP_MOVES, !JUMP_AFTER_REGSCAN); rebuild_jump_labels (insns);
find_basic_blocks (insns, max_reg_num (), rtl_dump_file);
cleanup_cfg (CLEANUP_EXPENSIVE);
timevar_pop (TV_JUMP); timevar_pop (TV_JUMP);
} }
...@@ -3053,7 +3059,8 @@ rest_of_compilation (decl) ...@@ -3053,7 +3059,8 @@ rest_of_compilation (decl)
{ {
tem = tem2 = 0; tem = tem2 = 0;
timevar_push (TV_JUMP); timevar_push (TV_JUMP);
jump_optimize (insns, !JUMP_NOOP_MOVES, !JUMP_AFTER_REGSCAN); rebuild_jump_labels (insns);
cleanup_cfg (CLEANUP_EXPENSIVE);
timevar_pop (TV_JUMP); timevar_pop (TV_JUMP);
if (flag_expensive_optimizations) if (flag_expensive_optimizations)
...@@ -3126,7 +3133,6 @@ rest_of_compilation (decl) ...@@ -3126,7 +3133,6 @@ rest_of_compilation (decl)
delete_trivially_dead_insns (insns, max_reg_num (), 0); delete_trivially_dead_insns (insns, max_reg_num (), 0);
reg_scan (insns, max_reg_num (), 0); reg_scan (insns, max_reg_num (), 0);
jump_optimize (insns, !JUMP_NOOP_MOVES, JUMP_AFTER_REGSCAN);
timevar_push (TV_IFCVT); timevar_push (TV_IFCVT);
...@@ -3144,7 +3150,9 @@ rest_of_compilation (decl) ...@@ -3144,7 +3150,9 @@ rest_of_compilation (decl)
if (tem) if (tem)
{ {
timevar_push (TV_JUMP); timevar_push (TV_JUMP);
jump_optimize (insns, !JUMP_NOOP_MOVES, !JUMP_AFTER_REGSCAN); rebuild_jump_labels (insns);
find_basic_blocks (insns, max_reg_num (), rtl_dump_file);
cleanup_cfg (CLEANUP_EXPENSIVE);
timevar_pop (TV_JUMP); timevar_pop (TV_JUMP);
} }
} }
...@@ -3461,8 +3469,8 @@ rest_of_compilation (decl) ...@@ -3461,8 +3469,8 @@ rest_of_compilation (decl)
timevar_push (TV_FLOW2); timevar_push (TV_FLOW2);
open_dump_file (DFI_flow2, decl); open_dump_file (DFI_flow2, decl);
jump_optimize (insns, JUMP_NOOP_MOVES, !JUMP_AFTER_REGSCAN);
find_basic_blocks (insns, max_reg_num (), rtl_dump_file); find_basic_blocks (insns, max_reg_num (), rtl_dump_file);
cleanup_cfg (0);
/* On some machines, the prologue and epilogue code, or parts thereof, /* On some machines, the prologue and epilogue code, or parts thereof,
can be represented as RTL. Doing so lets us schedule insns between can be represented as RTL. Doing so lets us schedule insns between
...@@ -3599,6 +3607,8 @@ rest_of_compilation (decl) ...@@ -3599,6 +3607,8 @@ rest_of_compilation (decl)
/* CFG no longer kept up to date. */ /* CFG no longer kept up to date. */
purge_line_number_notes (insns);
/* If a scheduling pass for delayed branches is to be done, /* If a scheduling pass for delayed branches is to be done,
call the scheduling code. */ call the scheduling code. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment