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
This commit is contained in:
Richard Sandiford 2014-11-08 11:25:24 +00:00 committed by Richard Sandiford
parent 8ee963a298
commit f959dcbba2
2 changed files with 15 additions and 11 deletions

View 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.

View 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