This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] Remove CLEANUP_PRE_LOOP
- From: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 1 Mar 2006 17:08:22 +0100
- Subject: [patch] Remove CLEANUP_PRE_LOOP
Hello,
with loop.c gone, cfg cleanup does not need to care about preserving
structure of loop notes. The actual use of CLEANUP_PRE_LOOP flag in
cfg cleanup was removed with -floop-optimize, this patch removes the
CLEANUP_PRE_LOOP flag itself.
Bootstrapped & regtested on ia64.
Zdenek
* cse.c (rest_of_handle_cse): Do not pass CLEANUP_PRE_LOOP to cfg
cleanup.
* gcse.c (rest_of_handle_gcse): Ditto.
* except.c (gate_handle_eh): Ditto.
* cfgcleanup.c (rest_of_handle_jump2): Ditto.
* basic-block.h (CLEANUP_PRE_LOOP): Remove.
Index: cse.c
===================================================================
*** cse.c (revision 111602)
--- cse.c (working copy)
*************** rest_of_handle_cse (void)
*** 7864,7870 ****
delete_dead_jumptables ();
if (tem || optimize > 1)
! cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_PRE_LOOP);
}
struct tree_opt_pass pass_cse =
--- 7864,7870 ----
delete_dead_jumptables ();
if (tem || optimize > 1)
! cleanup_cfg (CLEANUP_EXPENSIVE);
}
struct tree_opt_pass pass_cse =
Index: gcse.c
===================================================================
*** gcse.c (revision 111602)
--- gcse.c (working copy)
*************** rest_of_handle_gcse (void)
*** 6695,6701 ****
timevar_push (TV_JUMP);
rebuild_jump_labels (get_insns ());
delete_dead_jumptables ();
! cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_PRE_LOOP);
timevar_pop (TV_JUMP);
}
--- 6695,6701 ----
timevar_push (TV_JUMP);
rebuild_jump_labels (get_insns ());
delete_dead_jumptables ();
! cleanup_cfg (CLEANUP_EXPENSIVE);
timevar_pop (TV_JUMP);
}
Index: except.c
===================================================================
*** except.c (revision 111602)
--- except.c (working copy)
*************** gate_handle_eh (void)
*** 3861,3869 ****
static void
rest_of_handle_eh (void)
{
! cleanup_cfg (CLEANUP_PRE_LOOP | CLEANUP_NO_INSN_DEL);
finish_eh_generation ();
! cleanup_cfg (CLEANUP_PRE_LOOP | CLEANUP_NO_INSN_DEL);
}
struct tree_opt_pass pass_rtl_eh =
--- 3861,3869 ----
static void
rest_of_handle_eh (void)
{
! cleanup_cfg (CLEANUP_NO_INSN_DEL);
finish_eh_generation ();
! cleanup_cfg (CLEANUP_NO_INSN_DEL);
}
struct tree_opt_pass pass_rtl_eh =
Index: cfgcleanup.c
===================================================================
*** cfgcleanup.c (revision 111602)
--- cfgcleanup.c (working copy)
*************** rest_of_handle_jump2 (void)
*** 2308,2314 ****
reg_scan (get_insns (), max_reg_num ());
if (dump_file)
dump_flow_info (dump_file, dump_flags);
! cleanup_cfg ((optimize ? CLEANUP_EXPENSIVE : 0) | CLEANUP_PRE_LOOP
| (flag_thread_jumps ? CLEANUP_THREADING : 0));
create_loop_notes ();
--- 2308,2314 ----
reg_scan (get_insns (), max_reg_num ());
if (dump_file)
dump_flow_info (dump_file, dump_flags);
! cleanup_cfg ((optimize ? CLEANUP_EXPENSIVE : 0)
| (flag_thread_jumps ? CLEANUP_THREADING : 0));
create_loop_notes ();
*************** rest_of_handle_jump2 (void)
*** 2316,2322 ****
purge_line_number_notes ();
if (optimize)
! cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_PRE_LOOP);
/* Jump optimization, and the removal of NULL pointer checks, may
have reduced the number of instructions substantially. CSE, and
--- 2316,2322 ----
purge_line_number_notes ();
if (optimize)
! cleanup_cfg (CLEANUP_EXPENSIVE);
/* Jump optimization, and the removal of NULL pointer checks, may
have reduced the number of instructions substantially. CSE, and
Index: basic-block.h
===================================================================
*** basic-block.h (revision 111602)
--- basic-block.h (working copy)
*************** enum update_life_extent
*** 832,856 ****
#define CLEANUP_CROSSJUMP 2 /* Do crossjumping. */
#define CLEANUP_POST_REGSTACK 4 /* We run after reg-stack and need
to care REG_DEAD notes. */
! #define CLEANUP_PRE_LOOP 8 /* Take care to preserve syntactic loop
! notes. */
! #define CLEANUP_UPDATE_LIFE 16 /* Keep life information up to date. */
! #define CLEANUP_THREADING 32 /* Do jump threading. */
! #define CLEANUP_NO_INSN_DEL 64 /* Do not try to delete trivially dead
insns. */
! #define CLEANUP_CFGLAYOUT 128 /* Do cleanup in cfglayout mode. */
! #define CLEANUP_LOG_LINKS 256 /* Update log links. */
/* The following are ORed in on top of the CLEANUP* flags in calls to
struct_equiv_block_eq. */
! #define STRUCT_EQUIV_START 512 /* Initializes the search range. */
! #define STRUCT_EQUIV_RERUN 1024 /* Rerun to find register use in
found equivalence. */
! #define STRUCT_EQUIV_FINAL 2048 /* Make any changes necessary to get
actual equivalence. */
! #define STRUCT_EQUIV_NEED_FULL_BLOCK 4096 /* struct_equiv_block_eq is required
to match only full blocks */
! #define STRUCT_EQUIV_MATCH_JUMPS 8192 /* Also include the jumps at the end of the block in the comparison. */
extern void life_analysis (int);
extern int update_life_info (sbitmap, enum update_life_extent, int);
--- 832,854 ----
#define CLEANUP_CROSSJUMP 2 /* Do crossjumping. */
#define CLEANUP_POST_REGSTACK 4 /* We run after reg-stack and need
to care REG_DEAD notes. */
! #define CLEANUP_UPDATE_LIFE 8 /* Keep life information up to date. */
! #define CLEANUP_THREADING 16 /* Do jump threading. */
! #define CLEANUP_NO_INSN_DEL 32 /* Do not try to delete trivially dead
insns. */
! #define CLEANUP_CFGLAYOUT 64 /* Do cleanup in cfglayout mode. */
! #define CLEANUP_LOG_LINKS 128 /* Update log links. */
/* The following are ORed in on top of the CLEANUP* flags in calls to
struct_equiv_block_eq. */
! #define STRUCT_EQUIV_START 256 /* Initializes the search range. */
! #define STRUCT_EQUIV_RERUN 512 /* Rerun to find register use in
found equivalence. */
! #define STRUCT_EQUIV_FINAL 1024 /* Make any changes necessary to get
actual equivalence. */
! #define STRUCT_EQUIV_NEED_FULL_BLOCK 2048 /* struct_equiv_block_eq is required
to match only full blocks */
! #define STRUCT_EQUIV_MATCH_JUMPS 4096 /* Also include the jumps at the end of the block in the comparison. */
extern void life_analysis (int);
extern int update_life_info (sbitmap, enum update_life_extent, int);