diff options
author | J"orn Rennecke <joern.rennecke@st.com> | 2005-12-13 13:04:18 +0000 |
---|---|---|
committer | Joern Rennecke <amylaar@gcc.gnu.org> | 2005-12-13 13:04:18 +0000 |
commit | 7d22e8989c52bd3b6ddbf85761204c7a759cf8c6 (patch) | |
tree | e701881426d487009dc1064a87c21abe61a14c8a /gcc/flow.c | |
parent | 80e6edb051397f18aa328e0ddeb83f4bf380b3f9 (diff) | |
download | gcc-7d22e8989c52bd3b6ddbf85761204c7a759cf8c6.zip gcc-7d22e8989c52bd3b6ddbf85761204c7a759cf8c6.tar.gz gcc-7d22e8989c52bd3b6ddbf85761204c7a759cf8c6.tar.bz2 |
PR rtl-optimization/20070 / part1
PR rtl-optimization/20070 / part1
* flow.c (update_life_info): If PROP_POST_REGSTACK is set, call
count_or_remove_death_notes with kill == -1.
(mark_set_1): Don't add REG_DEAD / REG_UNUSED notes for stack
registers if PROP_POST_REGSTACK is set.
(mark_used_reg): Likewise.
(count_or_remove_death_notes): If kill is -1, don't remove REG_DEAD /
REG_UNUSED notes for stack regs.
* cfgcleanup.c (condjump_equiv_p): Change parameters and processing
to match rtx_equiv_p machinery. Change caller.
(outgoing_edges_match): Likewise.
(try_crossjump_to_edge): Use struct_equiv_block_eq
instead of flow_find_cross_jump.
* basic-block.h (PROP_POST_REGSTACK, STRUCT_EQUIV_START): Define.
(STRUCT_EQUIV_RERUN, STRUCT_EQUIV_FINAL): Likewise.
(STRUCT_EQUIV_NEED_FULL_BLOCK, STRUCT_EQUIV_MATCH_JUMPS): Likewise.
(STRUCT_EQUIV_MAX_LOCAL): Likewise.
(struct struct_equiv_checkpoint, struct equiv_info): Likewise.
(insns_match_p): Update prototype.
(flow_find_cross_jump): Remove prototype.
(struct_equiv_block_eq, struct_equiv_init): Declare.
(rtx_equiv_p, condjump_equiv_p): Likewise.
* struct-equiv.c: Include reload.h.
(IMPOSSIBLE_MOVE_FACTOR): Define.
(assign_reg_reg_set, struct_equiv_make_checkpoint): New functions.
(struct_equiv_improve_checkpoint): Likewise.
(struct_equiv_restore_checkpoint, rtx_equiv_p): Likewise.
(set_dest_equiv_p, set_dest_addr_equiv_p, struct_equiv_init): Likewise.
(struct_equiv_merge, find_dying_input): Likewise.
(resolve_input_conflict, note_local_live): Likewise.
(death_notes_match_p): Change parameters and processing
to match rtx_equiv_p machinery. Change caller.
(insns_match_p): Likewise.
(flow_find_cross_jump): Replace with:
(struct_equiv_block_eq).
Back out this change:
2005-03-07 Kazu Hirata <kazu@cs.umass.edu>
* recog.c (verify_changes): Make it static.
* recog.h: Remove the corresponding prototype.
From-SVN: r108480
Diffstat (limited to 'gcc/flow.c')
-rw-r--r-- | gcc/flow.c | 43 |
1 files changed, 37 insertions, 6 deletions
@@ -643,7 +643,8 @@ update_life_info (sbitmap blocks, enum update_life_extent extent, /* If asked, remove notes from the blocks we'll update. */ if (extent == UPDATE_LIFE_GLOBAL_RM_NOTES) - count_or_remove_death_notes (blocks, 1); + count_or_remove_death_notes (blocks, + prop_flags & PROP_POST_REGSTACK ? -1 : 1); } /* Clear log links in case we are asked to (re)compute them. */ @@ -2926,7 +2927,13 @@ mark_set_1 (struct propagate_block_info *pbi, enum rtx_code code, rtx reg, rtx c if (flags & PROP_REG_INFO) REG_N_DEATHS (regno_first) += 1; - if (flags & PROP_DEATH_NOTES) + if (flags & PROP_DEATH_NOTES +#ifdef STACK_REGS + && (!(flags & PROP_POST_REGSTACK) + || !IN_RANGE (REGNO (reg), FIRST_STACK_REG, + LAST_STACK_REG)) +#endif + ) { /* Note that dead stores have already been deleted when possible. If we get here, we have found a @@ -2939,7 +2946,13 @@ mark_set_1 (struct propagate_block_info *pbi, enum rtx_code code, rtx reg, rtx c } else { - if (flags & PROP_DEATH_NOTES) + if (flags & PROP_DEATH_NOTES +#ifdef STACK_REGS + && (!(flags & PROP_POST_REGSTACK) + || !IN_RANGE (REGNO (reg), FIRST_STACK_REG, + LAST_STACK_REG)) +#endif + ) { /* This is a case where we have a multi-word hard register and some, but not all, of the words of the register are @@ -2998,7 +3011,12 @@ mark_set_1 (struct propagate_block_info *pbi, enum rtx_code code, rtx reg, rtx c here and count it. */ else if (GET_CODE (reg) == SCRATCH) { - if (flags & PROP_DEATH_NOTES) + if (flags & PROP_DEATH_NOTES +#ifdef STACK_REGS + && (!(flags & PROP_POST_REGSTACK) + || !IN_RANGE (REGNO (reg), FIRST_STACK_REG, LAST_STACK_REG)) +#endif + ) REG_NOTES (insn) = alloc_EXPR_LIST (REG_UNUSED, reg, REG_NOTES (insn)); } @@ -3764,6 +3782,10 @@ mark_used_reg (struct propagate_block_info *pbi, rtx reg, if (! some_was_live) { if ((pbi->flags & PROP_DEATH_NOTES) +#ifdef STACK_REGS + && (!(pbi->flags & PROP_POST_REGSTACK) + || !IN_RANGE (REGNO (reg), FIRST_STACK_REG, LAST_STACK_REG)) +#endif && ! find_regno_note (insn, REG_DEAD, regno_first)) REG_NOTES (insn) = alloc_EXPR_LIST (REG_DEAD, reg, REG_NOTES (insn)); @@ -4385,7 +4407,9 @@ struct tree_opt_pass pass_recompute_reg_usage = /* Optionally removes all the REG_DEAD and REG_UNUSED notes from a set of blocks. If BLOCKS is NULL, assume the universal set. Returns a count - of the number of registers that died. */ + of the number of registers that died. + If KILL is 1, remove old REG_DEAD / REG_UNUSED notes. If it is 0, don't. + if it is -1, remove them unless they pertain to a stack reg. */ int count_or_remove_death_notes (sbitmap blocks, int kill) @@ -4457,7 +4481,14 @@ count_or_remove_death_notes_bb (basic_block bb, int kill) /* Fall through. */ case REG_UNUSED: - if (kill) + if (kill > 0 + || (kill +#ifdef STACK_REGS + && (!REG_P (XEXP (link, 0)) + || !IN_RANGE (REGNO (XEXP (link, 0)), + FIRST_STACK_REG, LAST_STACK_REG)) +#endif + )) { rtx next = XEXP (link, 1); free_EXPR_LIST_node (link); |