arm.c (arm_note_pic_base): Delete.
authorRichard Sandiford <richard.sandiford@arm.com>
Sat, 8 Nov 2014 11:25:24 +0000 (11:25 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Sat, 8 Nov 2014 11:25:24 +0000 (11:25 +0000)
gcc/
* config/arm/arm.c (arm_note_pic_base): Delete.
(arm_cannot_copy_insn_p): Use FOR_EACH_SUBRTX.

From-SVN: r217255

gcc/ChangeLog
gcc/config/arm/arm.c

index d0e0c9eebbe106cc582856e56af12a5418005395..bf8183186f3f40f44c882c66940ade8d23f3d86a 100644 (file)
@@ -1,3 +1,8 @@
+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.
index 2e7c77b8bc14a4dd2f358718ae0af057fa04d167..3f2ddd4adb3bbf7c26bbdc6eb06c9ecf015398be 100644 (file)
@@ -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