Commit e6d83128 by Jan Hubicka Committed by Jan Hubicka

* combine.c (recog_for_combine): Avoid allocating unnecesary RTX.

From-SVN: r76553
parent 9c519c93
2004-01-25 Jan Hubicka <jh@suse.cz>
* combine.c (recog_for_combine): Avoid allocating unnecesary RTX.
2004-01-25 Richard Sandiford <rsandifo@redhat.com> 2004-01-25 Richard Sandiford <rsandifo@redhat.com>
* config/mips/mips-protos.h (mips_reg_mode_ok_for_base_p): Delete. * config/mips/mips-protos.h (mips_reg_mode_ok_for_base_p): Delete.
......
...@@ -9869,7 +9869,7 @@ recog_for_combine (rtx *pnewpat, rtx insn, rtx *pnotes) ...@@ -9869,7 +9869,7 @@ recog_for_combine (rtx *pnewpat, rtx insn, rtx *pnotes)
int num_clobbers_to_add = 0; int num_clobbers_to_add = 0;
int i; int i;
rtx notes = 0; rtx notes = 0;
rtx dummy_insn; rtx old_notes, old_pat;
/* If PAT is a PARALLEL, check to see if it contains the CLOBBER /* 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 we use to indicate that something didn't match. If we find such a
...@@ -9880,13 +9880,12 @@ recog_for_combine (rtx *pnewpat, rtx insn, rtx *pnotes) ...@@ -9880,13 +9880,12 @@ recog_for_combine (rtx *pnewpat, rtx insn, rtx *pnotes)
&& XEXP (XVECEXP (pat, 0, i), 0) == const0_rtx) && XEXP (XVECEXP (pat, 0, i), 0) == const0_rtx)
return -1; return -1;
/* *pnewpat does not have to be actual PATTERN (insn), so make a dummy old_pat = PATTERN (insn);
instruction for pattern recognition. */ old_notes = REG_NOTES (insn);
dummy_insn = shallow_copy_rtx (insn); PATTERN (insn) = pat;
PATTERN (dummy_insn) = pat; REG_NOTES (insn) = 0;
REG_NOTES (dummy_insn) = 0;
insn_code_number = recog (pat, dummy_insn, &num_clobbers_to_add); insn_code_number = recog (pat, insn, &num_clobbers_to_add);
/* If it isn't, there is the possibility that we previously had an insn /* If it isn't, there is the possibility that we previously had an insn
that clobbered some register as a side effect, but the combined that clobbered some register as a side effect, but the combined
...@@ -9911,9 +9910,11 @@ recog_for_combine (rtx *pnewpat, rtx insn, rtx *pnotes) ...@@ -9911,9 +9910,11 @@ recog_for_combine (rtx *pnewpat, rtx insn, rtx *pnotes)
if (pos == 1) if (pos == 1)
pat = XVECEXP (pat, 0, 0); pat = XVECEXP (pat, 0, 0);
PATTERN (dummy_insn) = pat; PATTERN (insn) = pat;
insn_code_number = recog (pat, dummy_insn, &num_clobbers_to_add); insn_code_number = recog (pat, insn, &num_clobbers_to_add);
} }
PATTERN (insn) = old_pat;
REG_NOTES (insn) = old_notes;
/* Recognize all noop sets, these will be killed by followup pass. */ /* Recognize all noop sets, these will be killed by followup pass. */
if (insn_code_number < 0 && GET_CODE (pat) == SET && set_noop_p (pat)) if (insn_code_number < 0 && GET_CODE (pat) == SET && set_noop_p (pat))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment