+2014-10-27 Richard Sandiford <richard.sandiford@arm.com>
+
+ * config/alpha/alpha-protos.h (some_small_symbolic_operand_int):
+ Take an rtx and return a bool.
+ * config/alpha/alpha.c (some_small_symbolic_operand_int): Likewise.
+ Use FOR_EACH_SUBRTX_VAR.
+ * config/alpha/predicates.md (some_small_symbolic_operand): Update
+ accordingly.
+
2014-10-27 Richard Sandiford <richard.sandiford@arm.com>
* config/alpha/alpha-protos.h (alpha_find_lo_sum_using_gp): Return
extern rtx unicosmk_add_call_info_word (rtx);
-extern int some_small_symbolic_operand_int (rtx *, void *);
+extern bool some_small_symbolic_operand_int (rtx);
extern int tls_symbolic_operand_1 (rtx, int, int);
extern rtx resolve_reload_operand (rtx);
return decl_has_samegp (decl);
}
-int
-some_small_symbolic_operand_int (rtx *px, void *data ATTRIBUTE_UNUSED)
+bool
+some_small_symbolic_operand_int (rtx x)
{
- rtx x = *px;
-
- /* Don't re-split. */
- if (GET_CODE (x) == LO_SUM)
- return -1;
-
- return small_symbolic_operand (x, Pmode) != 0;
+ subrtx_var_iterator::array_type array;
+ FOR_EACH_SUBRTX_VAR (iter, array, x, ALL)
+ {
+ rtx x = *iter;
+ /* Don't re-split. */
+ if (GET_CODE (x) == LO_SUM)
+ iter.skip_subrtxes ();
+ else if (small_symbolic_operand (x, Pmode))
+ return true;
+ }
+ return false;
}
rtx
/* Avoid search unless necessary. */
if (!TARGET_EXPLICIT_RELOCS || !reload_completed)
return false;
- return for_each_rtx (&op, some_small_symbolic_operand_int, NULL);
+ return some_small_symbolic_operand_int (op);
})
;; Accept a register, or a memory if BWX is enabled.