From: Richard Sandiford Date: Sat, 8 Nov 2014 11:25:24 +0000 (+0000) Subject: arm.c (arm_note_pic_base): Delete. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f959dcbba24faef0b0c0db98e044dcd3a9174c4e;p=gcc.git arm.c (arm_note_pic_base): Delete. gcc/ * config/arm/arm.c (arm_note_pic_base): Delete. (arm_cannot_copy_insn_p): Use FOR_EACH_SUBRTX. From-SVN: r217255 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d0e0c9eebbe..bf8183186f3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-11-08 Richard Sandiford + + * config/arm/arm.c (arm_note_pic_base): Delete. + (arm_cannot_copy_insn_p): Use FOR_EACH_SUBRTX. + 2014-11-08 Richard Sandiford * config/arm/arm.c: Include rtl-iter.h. diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 2e7c77b8bc1..3f2ddd4adb3 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -13199,16 +13199,6 @@ tls_mentioned_p (rtx x) /* 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) { @@ -13217,7 +13207,16 @@ 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