#define SUBST_MODE(INTO, NEWVAL) do_SUBST_MODE (&(INTO), (NEWVAL))
-#if !HAVE_cc0
/* Similar to SUBST, but NEWVAL is a LOG_LINKS expression. */
static void
}
#define SUBST_LINK(oldval, newval) do_SUBST_LINK (&oldval, newval)
-#endif
\f
/* Subroutine of try_combine. Determine whether the replacement patterns
NEWPAT, NEWI2PAT and NEWOTHERPAT are cheaper according to insn_rtx_cost
combine_instructions (rtx_insn *f, unsigned int nregs)
{
rtx_insn *insn, *next;
-#if HAVE_cc0
rtx_insn *prev;
-#endif
struct insn_link *links, *nextlinks;
rtx_insn *first;
basic_block last_bb;
}
}
-#if HAVE_cc0
/* Try to combine a jump insn that uses CC0
with a preceding insn that sets CC0, and maybe with its
logical predecessor as well.
We need this special code because data flow connections
via CC0 do not get entered in LOG_LINKS. */
- if (JUMP_P (insn)
+ if (HAVE_cc0
+ && JUMP_P (insn)
&& (prev = prev_nonnote_insn (insn)) != 0
&& NONJUMP_INSN_P (prev)
&& sets_cc0_p (PATTERN (prev)))
}
/* Do the same for an insn that explicitly references CC0. */
- if (NONJUMP_INSN_P (insn)
+ if (HAVE_cc0 && NONJUMP_INSN_P (insn)
&& (prev = prev_nonnote_insn (insn)) != 0
&& NONJUMP_INSN_P (prev)
&& sets_cc0_p (PATTERN (prev))
/* Finally, see if any of the insns that this insn links to
explicitly references CC0. If so, try this insn, that insn,
and its predecessor if it sets CC0. */
- FOR_EACH_LOG_LINK (links, insn)
- if (NONJUMP_INSN_P (links->insn)
- && GET_CODE (PATTERN (links->insn)) == SET
- && reg_mentioned_p (cc0_rtx, SET_SRC (PATTERN (links->insn)))
- && (prev = prev_nonnote_insn (links->insn)) != 0
- && NONJUMP_INSN_P (prev)
- && sets_cc0_p (PATTERN (prev))
- && (next = try_combine (insn, links->insn,
- prev, NULL, &new_direct_jump_p,
- last_combined_insn)) != 0)
- goto retry;
-#endif
+ if (HAVE_cc0)
+ {
+ FOR_EACH_LOG_LINK (links, insn)
+ if (NONJUMP_INSN_P (links->insn)
+ && GET_CODE (PATTERN (links->insn)) == SET
+ && reg_mentioned_p (cc0_rtx, SET_SRC (PATTERN (links->insn)))
+ && (prev = prev_nonnote_insn (links->insn)) != 0
+ && NONJUMP_INSN_P (prev)
+ && sets_cc0_p (PATTERN (prev))
+ && (next = try_combine (insn, links->insn,
+ prev, NULL, &new_direct_jump_p,
+ last_combined_insn)) != 0)
+ goto retry;
+ }
/* Try combining an insn with two different insns whose results it
uses. */
return true;
}
-#if !HAVE_cc0
/* Return whether INSN, a PARALLEL of N register SETs (and maybe some
CLOBBERs), can be split into individual SETs in that order, without
changing semantics. */
return true;
}
-#endif
/* Try to combine the insns I0, I1 and I2 into I3.
Here I0, I1 and I2 appear earlier than I3.
}
}
-#if !HAVE_cc0
/* If we have no I1 and I2 looks like:
(parallel [(set (reg:CC X) (compare:CC OP (const_int 0)))
(set Y OP)])
This undoes a previous combination and allows us to match a branch-and-
decrement insn. */
- if (i1 == 0
+ if (!HAVE_cc0 && i1 == 0
&& is_parallel_of_n_reg_sets (PATTERN (i2), 2)
&& (GET_MODE_CLASS (GET_MODE (SET_DEST (XVECEXP (PATTERN (i2), 0, 0))))
== MODE_CC)
/* If I2 is a PARALLEL of two SETs of REGs (and perhaps some CLOBBERs),
make those two SETs separate I1 and I2 insns, and make an I0 that is
the original I1. */
- if (i0 == 0
+ if (!HAVE_cc0 && i0 == 0
&& is_parallel_of_n_reg_sets (PATTERN (i2), 2)
&& can_split_parallel_of_n_reg_sets (i2, 2)
&& !reg_used_between_p (SET_DEST (XVECEXP (PATTERN (i2), 0, 0)), i2, i3)
SUBST (PATTERN (i2), XVECEXP (PATTERN (i2), 0, 1));
}
-#endif
/* Verify that I2 and I1 are valid for combining. */
if (! can_combine_p (i2, i3, i0, i1, NULL, NULL, &i2dest, &i2src)
&& ! (code == SUBREG
&& MODES_TIEABLE_P (GET_MODE (x),
GET_MODE (SUBREG_REG (to))))
-#if HAVE_cc0
- && ! (code == SET && i == 1 && XEXP (x, 0) == cc0_rtx)
-#endif
- )
+ && (!HAVE_cc0
+ || (! (code == SET
+ && i == 1
+ && XEXP (x, 0) == cc0_rtx))))
return gen_rtx_CLOBBER (VOIDmode, const0_rtx);
if (code == SUBREG
if (set != 0 && ! side_effects_p (SET_SRC (set))
&& rtx_equal_p (XEXP (note, 0), inner_dest)
-#if HAVE_cc0
- && (! reg_mentioned_p (cc0_rtx, SET_SRC (set))
- || ((cc0_setter = prev_cc0_setter (tem_insn)) != NULL
- && sets_cc0_p (PATTERN (cc0_setter)) > 0))
-#endif
- )
+ && (!HAVE_cc0
+ || (! reg_mentioned_p (cc0_rtx, SET_SRC (set))
+ || ((cc0_setter = prev_cc0_setter (tem_insn)) != NULL
+ && sets_cc0_p (PATTERN (cc0_setter)) > 0))))
{
/* Move the notes and links of TEM_INSN elsewhere.
This might delete other dead insns recursively.