+2014-09-05 David Malcolm <dmalcolm@redhat.com>
+
+ * recog.c (peep2_attempt): Strengthen return type from rtx to
+ rtx_insn *.
+ (peep2_update_life): Likewise for params "last", "prev", removing
+ a checked cast made redundant by this.
+ (peephole2_optimize): Likewise for local "last".
+
2014-09-05 David Malcolm <dmalcolm@redhat.com>
* basic-block.h (set_block_for_insn): Eliminate this macro in
replacing them with ATTEMPT. Returns the last insn emitted, or NULL
if the replacement is rejected. */
-static rtx
+static rtx_insn *
peep2_attempt (basic_block bb, rtx uncast_insn, int match_len, rtx_insn *attempt)
{
rtx_insn *insn = safe_as_a <rtx_insn *> (uncast_insn);
matched, and which now need to be replaced in the buffer. */
static void
-peep2_update_life (basic_block bb, int match_len, rtx last, rtx prev)
+peep2_update_life (basic_block bb, int match_len, rtx_insn *last,
+ rtx_insn *prev)
{
int i = peep2_buf_position (peep2_current + match_len + 1);
rtx_insn *x;
gcc_assert (peep2_current_count >= match_len + 1);
peep2_current_count -= match_len + 1;
- x = as_a <rtx_insn *> (last);
+ x = last;
do
{
if (INSN_P (x))
peephole2_insns (PATTERN (head), head, &match_len));
if (attempt != NULL)
{
- rtx last = peep2_attempt (bb, head, match_len, attempt);
+ rtx_insn *last = peep2_attempt (bb, head, match_len, attempt);
if (last)
{
peep2_update_life (bb, match_len, last, PREV_INSN (attempt));