aboutsummaryrefslogtreecommitdiff
path: root/gcc/toplev.c
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@gcc.gnu.org>2001-12-17 17:10:34 +0000
committerJan Hubicka <hubicka@gcc.gnu.org>2001-12-17 17:10:34 +0000
commit8ecba28a999a6c9d277fba937943c8b7f1e0fb4b (patch)
treeb310f6d4e86aabafa94250a0bfa8d932084402f4 /gcc/toplev.c
parente9c46bb75e87f0c3568372c6db9b77334556e440 (diff)
downloadgcc-8ecba28a999a6c9d277fba937943c8b7f1e0fb4b.zip
gcc-8ecba28a999a6c9d277fba937943c8b7f1e0fb4b.tar.gz
gcc-8ecba28a999a6c9d277fba937943c8b7f1e0fb4b.tar.bz2
Makefile.in (cfgcleanup.o): Add cselib.h dependancy.
* Makefile.in (cfgcleanup.o): Add cselib.h dependancy. * basic-block.h (CLEANUP_THREADING): New constant. * cfgcleanup.c: Include cselib.h (thread_jump, mark_effect): New functions. (try_forward_edges): Do jump threading when asked for. * jump.c (mark_modified_reg, save_regs, num_same_regs, modified_regs, modified_mem, thread_jumps, rtx_equal_for-thread_p): Kill. * rtl.h (thread_jumps, rtx_equal_for_thread_p): Kill. * toplev.c (rest_of_compilation): Do now call thread_jumps; use CLEANUP_THREAD instead. From-SVN: r48108
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r--gcc/toplev.c31
1 files changed, 9 insertions, 22 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c
index e5619cf..bab08c8 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -2680,7 +2680,8 @@ rest_of_compilation (decl)
if (optimize > 0)
{
find_basic_blocks (insns, max_reg_num (), rtl_dump_file);
- cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_PRE_LOOP);
+ cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_PRE_LOOP
+ | (flag_thread_jumps ? CLEANUP_THREADING : 0));
/* ??? Run if-conversion before delete_null_pointer_checks,
since the later does not preserve the CFG. This should
@@ -2721,13 +2722,6 @@ rest_of_compilation (decl)
reg_scan (insns, max_reg_num (), 1);
- if (flag_thread_jumps)
- {
- timevar_push (TV_JUMP);
- thread_jumps (insns, max_reg_num (), 1);
- timevar_pop (TV_JUMP);
- }
-
tem = cse_main (insns, max_reg_num (), 0, rtl_dump_file);
/* If we are not running more CSE passes, then we are no longer
@@ -2750,14 +2744,16 @@ rest_of_compilation (decl)
delete_trivially_dead_insns (insns, max_reg_num (), 0);
/* Try to identify useless null pointer tests and delete them. */
- if (flag_delete_null_pointer_checks)
+ if (flag_delete_null_pointer_checks || flag_thread_jumps)
{
timevar_push (TV_JUMP);
find_basic_blocks (insns, max_reg_num (), rtl_dump_file);
- cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_PRE_LOOP);
+ cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_PRE_LOOP
+ | (flag_thread_jumps ? CLEANUP_THREADING : 0));
- delete_null_pointer_checks (insns);
+ if (flag_delete_null_pointer_checks)
+ delete_null_pointer_checks (insns);
/* CFG is no longer maintained up-to-date. */
free_bb_for_insn ();
timevar_pop (TV_JUMP);
@@ -2928,16 +2924,6 @@ rest_of_compilation (decl)
}
}
- if (flag_thread_jumps)
- {
- /* This pass of jump threading straightens out code
- that was kinked by loop optimization. */
- timevar_push (TV_JUMP);
- reg_scan (insns, max_reg_num (), 0);
- thread_jumps (insns, max_reg_num (), 0);
- timevar_pop (TV_JUMP);
- }
-
close_dump_file (DFI_cse2, print_rtl, insns);
timevar_pop (TV_CSE2);
@@ -2955,7 +2941,8 @@ rest_of_compilation (decl)
open_dump_file (DFI_cfg, decl);
find_basic_blocks (insns, max_reg_num (), rtl_dump_file);
- cleanup_cfg (optimize ? CLEANUP_EXPENSIVE : 0);
+ cleanup_cfg (optimize ? CLEANUP_EXPENSIVE : 0
+ | (flag_thread_jumps ? CLEANUP_THREADING : 0));
check_function_return_warnings ();
/* It may make more sense to mark constant functions after dead code is