diff options
Diffstat (limited to 'contrib/gcc/flow.c')
-rw-r--r-- | contrib/gcc/flow.c | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/contrib/gcc/flow.c b/contrib/gcc/flow.c index 90bc5f8..fed908d 100644 --- a/contrib/gcc/flow.c +++ b/contrib/gcc/flow.c @@ -407,7 +407,7 @@ life_analysis (rtx f, FILE *file, int flags) #ifdef CANNOT_CHANGE_MODE_CLASS if (flags & PROP_REG_INFO) - bitmap_initialize (&subregs_of_mode, 1); + init_subregs_of_mode (); #endif if (! optimize) @@ -1591,7 +1591,7 @@ propagate_one_insn (struct propagate_block_info *pbi, rtx insn) pbi->cc0_live = 0; if (libcall_is_dead) - prev = propagate_block_delete_libcall ( insn, note); + prev = propagate_block_delete_libcall (insn, note); else { @@ -2268,7 +2268,7 @@ libcall_dead_p (struct propagate_block_info *pbi, rtx note, rtx insn) { rtx r = SET_SRC (x); - if (GET_CODE (r) == REG) + if (GET_CODE (r) == REG || GET_CODE (r) == SUBREG) { rtx call = XEXP (note, 0); rtx call_pat; @@ -2302,10 +2302,20 @@ libcall_dead_p (struct propagate_block_info *pbi, rtx note, rtx insn) call_pat = XVECEXP (call_pat, 0, i); } - return insn_dead_p (pbi, call_pat, 1, REG_NOTES (call)); + if (! insn_dead_p (pbi, call_pat, 1, REG_NOTES (call))) + return 0; + + while ((insn = PREV_INSN (insn)) != call) + { + if (! INSN_P (insn)) + continue; + if (! insn_dead_p (pbi, PATTERN (insn), 0, REG_NOTES (insn))) + return 0; + } + return 1; } } - return 1; + return 0; } /* Return 1 if register REGNO was used before it was set, i.e. if it is @@ -3776,12 +3786,8 @@ mark_used_regs (struct propagate_block_info *pbi, rtx x, rtx cond, rtx insn) case SUBREG: #ifdef CANNOT_CHANGE_MODE_CLASS - if ((flags & PROP_REG_INFO) - && GET_CODE (SUBREG_REG (x)) == REG - && REGNO (SUBREG_REG (x)) >= FIRST_PSEUDO_REGISTER) - bitmap_set_bit (&subregs_of_mode, REGNO (SUBREG_REG (x)) - * MAX_MACHINE_MODE - + GET_MODE (x)); + if (flags & PROP_REG_INFO) + record_subregs_of_mode (x); #endif /* While we're here, optimize this case. */ @@ -3826,13 +3832,8 @@ mark_used_regs (struct propagate_block_info *pbi, rtx x, rtx cond, rtx insn) || GET_CODE (testreg) == SUBREG) { #ifdef CANNOT_CHANGE_MODE_CLASS - if ((flags & PROP_REG_INFO) - && GET_CODE (testreg) == SUBREG - && GET_CODE (SUBREG_REG (testreg)) == REG - && REGNO (SUBREG_REG (testreg)) >= FIRST_PSEUDO_REGISTER) - bitmap_set_bit (&subregs_of_mode, REGNO (SUBREG_REG (testreg)) - * MAX_MACHINE_MODE - + GET_MODE (testreg)); + if ((flags & PROP_REG_INFO) && GET_CODE (testreg) == SUBREG) + record_subregs_of_mode (testreg); #endif /* Modifying a single register in an alternate mode |