diff options
author | Bernd Schmidt <crux@pool.informatik.rwth-aachen.de> | 1998-10-19 09:47:55 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1998-10-19 03:47:55 -0600 |
commit | 8e2f6e35ba3c0a41ce84e6a5e05731f00db3044f (patch) | |
tree | 5cc75d1ec07f21f993ad6ecedcd6cd7f5894aa7e /gcc/combine.c | |
parent | 02bc9733948fb3f06d4aa1ad1c93f4c67688545c (diff) | |
download | gcc-8e2f6e35ba3c0a41ce84e6a5e05731f00db3044f.zip gcc-8e2f6e35ba3c0a41ce84e6a5e05731f00db3044f.tar.gz gcc-8e2f6e35ba3c0a41ce84e6a5e05731f00db3044f.tar.bz2 |
combine.c (recog_for_combine): Lose PADDED_SCRATCHES arg.
* combine.c (recog_for_combine): Lose PADDED_SCRATCHES arg. All
callers changed.
(try_combine): Don't update max_scratch.
* flow.c (max_scratch, num_scratch): Delete variables.
(life_analysis_1): Don't initialize max_scratch.
(propagate_block): Don't update max_scratch.
(mark_set_1): Don't increment num_scratch.
* regs.h (max_scratch): Delete declaration.
From-SVN: r23172
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 61 |
1 files changed, 17 insertions, 44 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index f355abc..19df104 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -426,7 +426,7 @@ static int merge_outer_ops PROTO((enum rtx_code *, HOST_WIDE_INT *, enum machine_mode, int *)); static rtx simplify_shift_const PROTO((rtx, enum rtx_code, enum machine_mode, rtx, int)); -static int recog_for_combine PROTO((rtx *, rtx, rtx *, int *)); +static int recog_for_combine PROTO((rtx *, rtx, rtx *)); static rtx gen_lowpart_for_combine PROTO((enum machine_mode, rtx)); static rtx gen_rtx_combine PVPROTO((enum rtx_code code, enum machine_mode mode, ...)); @@ -1356,8 +1356,6 @@ try_combine (i3, i2, i1) int i3_subst_into_i2 = 0; /* Notes that I1, I2 or I3 is a MULT operation. */ int have_mult = 0; - /* Number of clobbers of SCRATCH we had to add. */ - int i3_scratches = 0, i2_scratches = 0, other_scratches = 0; int maxreg; rtx temp; @@ -1834,8 +1832,7 @@ try_combine (i3, i2, i1) mark_used_regs_combine (newpat); /* Is the result of combination a valid instruction? */ - insn_code_number - = recog_for_combine (&newpat, i3, &new_i3_notes, &i3_scratches); + insn_code_number = recog_for_combine (&newpat, i3, &new_i3_notes); /* If the result isn't valid, see if it is a PARALLEL of two SETs where the second SET's destination is a register that is unused. In that case, @@ -1856,8 +1853,7 @@ try_combine (i3, i2, i1) && asm_noperands (newpat) < 0) { newpat = XVECEXP (newpat, 0, 0); - insn_code_number - = recog_for_combine (&newpat, i3, &new_i3_notes, &i3_scratches); + insn_code_number = recog_for_combine (&newpat, i3, &new_i3_notes); } else if (insn_code_number < 0 && GET_CODE (newpat) == PARALLEL @@ -1870,8 +1866,7 @@ try_combine (i3, i2, i1) && asm_noperands (newpat) < 0) { newpat = XVECEXP (newpat, 0, 1); - insn_code_number - = recog_for_combine (&newpat, i3, &new_i3_notes, &i3_scratches); + insn_code_number = recog_for_combine (&newpat, i3, &new_i3_notes); } /* If we were combining three insns and the result is a simple SET @@ -1940,8 +1935,7 @@ try_combine (i3, i2, i1) if (REGNO (i2dest) >= FIRST_PSEUDO_REGISTER) SUBST (regno_reg_rtx[REGNO (i2dest)], ni2dest); - i2_code_number = recog_for_combine (&newi2pat, i2, &new_i2_notes, - &i2_scratches); + i2_code_number = recog_for_combine (&newi2pat, i2, &new_i2_notes); /* If I2 or I3 has multiple SETs, we won't know how to track register status, so don't use these insns. If I2's destination @@ -1950,8 +1944,8 @@ try_combine (i3, i2, i1) if (i2_code_number >= 0 && i2set && i3set && (next_real_insn (i2) == i3 || ! reg_used_between_p (SET_DEST (i2set), i2, i3))) - insn_code_number = recog_for_combine (&newi3pat, i3, &new_i3_notes, - &i3_scratches); + insn_code_number = recog_for_combine (&newi3pat, i3, + &new_i3_notes); if (insn_code_number >= 0) newpat = newi3pat; @@ -2038,14 +2032,12 @@ try_combine (i3, i2, i1) newi2pat = gen_rtx_combine (SET, VOIDmode, newdest, *split); SUBST (*split, newdest); - i2_code_number - = recog_for_combine (&newi2pat, i2, &new_i2_notes, &i2_scratches); + i2_code_number = recog_for_combine (&newi2pat, i2, &new_i2_notes); /* If the split point was a MULT and we didn't have one before, don't use one now. */ if (i2_code_number >= 0 && ! (split_code == MULT && ! have_mult)) - insn_code_number - = recog_for_combine (&newpat, i3, &new_i3_notes, &i3_scratches); + insn_code_number = recog_for_combine (&newpat, i3, &new_i3_notes); } } @@ -2099,12 +2091,10 @@ try_combine (i3, i2, i1) newpat = XVECEXP (newpat, 0, 1); SUBST (SET_SRC (newpat), gen_lowpart_for_combine (GET_MODE (SET_SRC (newpat)), ni2dest)); - i2_code_number - = recog_for_combine (&newi2pat, i2, &new_i2_notes, &i2_scratches); + i2_code_number = recog_for_combine (&newi2pat, i2, &new_i2_notes); if (i2_code_number >= 0) - insn_code_number - = recog_for_combine (&newpat, i3, &new_i3_notes, &i3_scratches); + insn_code_number = recog_for_combine (&newpat, i3, &new_i3_notes); if (insn_code_number >= 0) { @@ -2191,12 +2181,10 @@ try_combine (i3, i2, i1) newpat = XVECEXP (newpat, 0, 0); } - i2_code_number - = recog_for_combine (&newi2pat, i2, &new_i2_notes, &i2_scratches); + i2_code_number = recog_for_combine (&newi2pat, i2, &new_i2_notes); if (i2_code_number >= 0) - insn_code_number - = recog_for_combine (&newpat, i3, &new_i3_notes, &i3_scratches); + insn_code_number = recog_for_combine (&newpat, i3, &new_i3_notes); } /* If it still isn't recognized, fail and change things back the way they @@ -2218,9 +2206,8 @@ try_combine (i3, i2, i1) CLEAR_HARD_REG_SET (newpat_used_regs); - other_code_number - = recog_for_combine (&other_pat, undobuf.other_insn, - &new_other_notes, &other_scratches); + other_code_number = recog_for_combine (&other_pat, undobuf.other_insn, + &new_other_notes); if (other_code_number < 0 && ! check_asm_operands (other_pat)) { @@ -2537,12 +2524,6 @@ try_combine (i3, i2, i1) if (newi2pat) note_stores (newi2pat, set_nonzero_bits_and_sign_copies); - /* If we added any (clobber (scratch)), add them to the max for a - block. This is a very pessimistic calculation, since we might - have had them already and this might not be the worst block, but - it's not worth doing any better. */ - max_scratch += i3_scratches + i2_scratches + other_scratches; - /* If I3 is now an unconditional jump, ensure that it has a BARRIER following it since it may have initially been a conditional jump. It may also be the last nonnote insn. */ @@ -4653,7 +4634,7 @@ simplify_set (x) rtx pat = PATTERN (other_insn), note = 0; int scratches; - if ((recog_for_combine (&pat, other_insn, ¬e, &scratches) < 0 + if ((recog_for_combine (&pat, other_insn, ¬e) < 0 && ! check_asm_operands (pat))) { PUT_CODE (*cc_use, old_code); @@ -9052,18 +9033,14 @@ simplify_shift_const (x, code, result_mode, varop, count) PNOTES is a pointer to a location where any REG_UNUSED notes added for the CLOBBERs are placed. - PADDED_SCRATCHES is set to the number of (clobber (scratch)) patterns - we had to add. - The value is the final insn code from the pattern ultimately matched, or -1. */ static int -recog_for_combine (pnewpat, insn, pnotes, padded_scratches) +recog_for_combine (pnewpat, insn, pnotes) rtx *pnewpat; rtx insn; rtx *pnotes; - int *padded_scratches; { register rtx pat = *pnewpat; int insn_code_number; @@ -9071,8 +9048,6 @@ recog_for_combine (pnewpat, insn, pnotes, padded_scratches) int i; rtx notes = 0; - *padded_scratches = 0; - /* If PAT is a PARALLEL, check to see if it contains the CLOBBER we use to indicate that something didn't match. If we find such a thing, force rejection. */ @@ -9134,8 +9109,6 @@ recog_for_combine (pnewpat, insn, pnotes, padded_scratches) if (GET_CODE (XEXP (XVECEXP (newpat, 0, i), 0)) == REG && ! reg_dead_at_p (XEXP (XVECEXP (newpat, 0, i), 0), insn)) return -1; - else if (GET_CODE (XEXP (XVECEXP (newpat, 0, i), 0)) == SCRATCH) - (*padded_scratches)++; notes = gen_rtx_EXPR_LIST (REG_UNUSED, XEXP (XVECEXP (newpat, 0, i), 0), notes); } |