+2014-11-08 Richard Sandiford <richard.sandiford@arm.com>
+
+ * config/arm/arm.c (arm_note_pic_base): Delete.
+ (arm_cannot_copy_insn_p): Use FOR_EACH_SUBRTX.
+
2014-11-08 Richard Sandiford <richard.sandiford@arm.com>
* config/arm/arm.c: Include rtl-iter.h.
/* Must not copy any rtx that uses a pc-relative address. */
-static int
-arm_note_pic_base (rtx *x, void *date ATTRIBUTE_UNUSED)
-{
- if (GET_CODE (*x) == UNSPEC
- && (XINT (*x, 1) == UNSPEC_PIC_BASE
- || XINT (*x, 1) == UNSPEC_PIC_UNIFIED))
- return 1;
- return 0;
-}
-
static bool
arm_cannot_copy_insn_p (rtx_insn *insn)
{
if (recog_memoized (insn) == CODE_FOR_tlscall)
return true;
- return for_each_rtx (&PATTERN (insn), arm_note_pic_base, NULL);
+ subrtx_iterator::array_type array;
+ FOR_EACH_SUBRTX (iter, array, PATTERN (insn), ALL)
+ {
+ const_rtx x = *iter;
+ if (GET_CODE (x) == UNSPEC
+ && (XINT (x, 1) == UNSPEC_PIC_BASE
+ || XINT (x, 1) == UNSPEC_PIC_UNIFIED))
+ return true;
+ }
+ return false;
}
enum rtx_code