-
/* Perform branch target register load optimizations.
Copyright (C) 2001-2016 Free Software Foundation, Inc.
return bb->frequency;
}
-/* If X references (sets or reads) any branch target register, return one
- such register. If EXCLUDEP is set, disregard any references within
- that location. */
+/* If the rtx at *XP references (sets or reads) any branch target
+ register, return one such register. If EXCLUDEP is set, disregard
+ any references within that location. */
static rtx *
-find_btr_use (rtx x, rtx *excludep = 0)
+find_btr_use (rtx *xp, rtx *excludep = 0)
{
subrtx_ptr_iterator::array_type array;
- FOR_EACH_SUBRTX_PTR (iter, array, &x, NONCONST)
+ FOR_EACH_SUBRTX_PTR (iter, array, xp, NONCONST)
{
rtx *loc = *iter;
if (loc == excludep)
if (REG_P (dest)
&& TEST_HARD_REG_BIT (all_btrs, REGNO (dest)))
{
- gcc_assert (!find_btr_use (src));
+ gcc_assert (!find_btr_use (&src));
if (!check_const || CONSTANT_P (src))
{
to decide whether we can replace all target register
uses easily.
*/
- rtx *usep = find_btr_use (PATTERN (insn));
+ rtx *usep = find_btr_use (&PATTERN (insn));
rtx use;
btr_user *user = NULL;
/* We want to ensure that USE is the only use of a target
register in INSN, so that we know that to rewrite INSN to use
a different target register, all we have to do is replace USE. */
- unambiguous_single_use = !find_btr_use (PATTERN (insn), usep);
+ unambiguous_single_use = !find_btr_use (&PATTERN (insn), usep);
if (!unambiguous_single_use)
usep = NULL;
}
}
else
{
- if (find_btr_use (PATTERN (insn)))
+ if (find_btr_use (&PATTERN (insn)))
{
btr_user *user = new_btr_user (bb, insn_luid, insn);