Commit f3ba35e4 by Jan Hubicka Committed by Jan Hubicka

emit-rtl.c (try_split): Update mark_jump_label call.

	* 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.
	(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.

From-SVN: r43979
parent dd697c0d
Fri Jul 13 14:46:21 CEST 2001 Jan Hubicka <jh@suse.cz>
* 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.
(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.
2001-07-12 Steve Ellcey <sje@cup.hp.com>
* toplev.c (compile_file): Put call of ASM_FILE_START inside ifdef.
......
......@@ -2908,9 +2908,6 @@ Dump after sibling call optimizations, to @file{@var{file}.01.sibling}.
@item j
@opindex dj
Dump after the first jump optimization, to @file{@var{file}.03.jump}.
@item J
@opindex dJ
Dump after the last jump optimization, to @file{@var{file}.29.jump2}.
@item k
@opindex dk
Dump after conversion from registers to stack, to @file{@var{file}.32.stack}.
......
......@@ -2518,7 +2518,7 @@ try_split (pat, trial, last)
for (i = XVECLEN (seq, 0) - 1; i >= 0; i--)
if (GET_CODE (XVECEXP (seq, 0, i)) == JUMP_INSN)
mark_jump_label (PATTERN (XVECEXP (seq, 0, i)),
XVECEXP (seq, 0, i), 0, 0);
XVECEXP (seq, 0, i), 0);
/* If we are splitting a CALL_INSN, look for the CALL_INSN
in SEQ and copy our CALL_INSN_FUNCTION_USAGE to it. */
......
......@@ -798,7 +798,7 @@ find_sub_basic_blocks (bb)
bb = BASIC_BLOCK (i);
if (GET_CODE (bb->end) == JUMP_INSN)
{
mark_jump_label (PATTERN (bb->end), bb->end, 0, 0);
mark_jump_label (PATTERN (bb->end), bb->end, 0);
make_label_edge (NULL, bb, JUMP_LABEL (bb->end), 0);
}
insn = NEXT_INSN (insn);
......
......@@ -419,6 +419,9 @@ reg_to_stack (first, file)
int max_uid;
block_info bi;
if (!optimize)
split_all_insns (0);
/* See if there is something to do. Flow analysis is quite
expensive so we might save some compilation time. */
for (i = FIRST_STACK_REG; i <= LAST_STACK_REG; i++)
......@@ -429,7 +432,8 @@ reg_to_stack (first, file)
/* Ok, floating point instructions exist. If not optimizing,
build the CFG and run life analysis. */
find_basic_blocks (first, max_reg_num (), file);
if (!optimize)
find_basic_blocks (first, max_reg_num (), file);
count_or_remove_death_notes (NULL, 1);
life_analysis (first, file, PROP_DEATH_NOTES);
......
......@@ -1285,7 +1285,7 @@ extern enum rtx_code reverse_condition_maybe_unordered PARAMS ((enum rtx_code));
extern enum rtx_code swap_condition PARAMS ((enum rtx_code));
extern enum rtx_code unsigned_condition PARAMS ((enum rtx_code));
extern enum rtx_code signed_condition PARAMS ((enum rtx_code));
extern void mark_jump_label PARAMS ((rtx, rtx, int, int));
extern void mark_jump_label PARAMS ((rtx, rtx, int));
/* In jump.c */
extern rtx squeeze_notes PARAMS ((rtx, rtx));
......@@ -1715,7 +1715,7 @@ extern int rtx_renumbered_equal_p PARAMS ((rtx, rtx));
extern int true_regnum PARAMS ((rtx));
extern int redirect_jump_1 PARAMS ((rtx, rtx));
extern int redirect_jump PARAMS ((rtx, rtx, int));
extern void jump_optimize PARAMS ((rtx, int, int, 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 thread_jumps PARAMS ((rtx, int, int));
......@@ -1729,8 +1729,6 @@ extern int condjump_in_parallel_p PARAMS ((rtx));
extern void never_reached_warning PARAMS ((rtx));
/* Flags for jump_optimize() */
#define JUMP_CROSS_JUMP 1
#define JUMP_CROSS_JUMP_DEATH_MATTERS 2
#define JUMP_NOOP_MOVES 1
#define JUMP_AFTER_REGSCAN 1
......
......@@ -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] =
......@@ -330,7 +329,6 @@ struct dump_file_info dump_file[DFI_MAX] =
{ "ce2", 'E', 1, 0, 0 },
{ "sched2", 'R', 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 },
......@@ -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 ();
......
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