+Sun Jul 29 21:38:45 CEST 2001 Jan Hubicka <jh@suse.cz>
+
+ Suggested by Richard Henderson and Richard Kenner:
+ * combine.c (recog_for_combine): Use the fake recog
+ only if instruction does not match.
+ * rtl.h (NOOP_MOVE_INSN_CODE): New.
+ * rtlanal.c (noop_move_p): Always return 1 for NOOP_MOVE_INSN_CODE.
+
+ * combine.c (try_combine): Discover noop jump as direct jump.
+
2001-07-29 Daniel Berlin <dan@cgsoftware.com>
* df.c (df_rd_global_compute): Add successors to worklist, not
BARRIER following it since it may have initially been a
conditional jump. It may also be the last nonnote insn. */
- if (GET_CODE (newpat) == RETURN || any_uncondjump_p (i3))
+ if (GET_CODE (newpat) == RETURN || any_uncondjump_p (i3)
+ || (GET_CODE (newpat) == SET
+ && SET_SRC (newpat) == pc_rtx
+ && SET_DEST (newpat) == pc_rtx))
{
*new_direct_jump_p = 1;
old_notes = REG_NOTES (insn);
REG_NOTES (insn) = 0;
- /* Is the result of combination a valid instruction?
- Recognize all noop sets, these will be killed by followup pass. */
- if (GET_CODE (pat) == SET && set_noop_p (pat))
- insn_code_number = INT_MAX;
- else
- insn_code_number = recog (pat, 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
that clobbered some register as a side effect, but the combined
if (pos == 1)
pat = XVECEXP (pat, 0, 0);
- /* Recognize all noop sets, these will be killed by followup pass. */
- if (GET_CODE (pat) == SET && set_noop_p (pat))
- insn_code_number = INT_MAX;
- else
- insn_code_number = recog (pat, insn, &num_clobbers_to_add);
+ insn_code_number = recog (pat, insn, &num_clobbers_to_add);
}
+ /* Recognize all noop sets, these will be killed by followup pass. */
+ if (insn_code_number < 0 && GET_CODE (pat) == SET && set_noop_p (pat))
+ insn_code_number = NOOP_MOVE_INSN_CODE, num_clobbers_to_add = 0;
+
REG_NOTES (insn) = old_notes;
/* If we had any clobbers to add, make a new pattern than contains