This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH 205/236] function.c: Use rtx_sequence
- From: David Malcolm <dmalcolm at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: David Malcolm <dmalcolm at redhat dot com>
- Date: Wed, 6 Aug 2014 13:23:04 -0400
- Subject: [PATCH 205/236] function.c: Use rtx_sequence
- Authentication-results: sourceware.org; auth=none
- References: <1407345815-14551-1-git-send-email-dmalcolm at redhat dot com>
gcc/
* function.c (contains): Introduce local "seq" for PATTERN (insn),
with a checked cast, in the region for where we know it's a
SEQUENCE. Use methods of rtx_sequence.
---
gcc/function.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/gcc/function.c b/gcc/function.c
index 771ced9..5561dc5 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -5305,9 +5305,10 @@ contains (const_rtx insn, htab_t hash)
if (NONJUMP_INSN_P (insn) && GET_CODE (PATTERN (insn)) == SEQUENCE)
{
+ rtx_sequence *seq = as_a <rtx_sequence *> (PATTERN (insn));
int i;
- for (i = XVECLEN (PATTERN (insn), 0) - 1; i >= 0; i--)
- if (htab_find (hash, XVECEXP (PATTERN (insn), 0, i)))
+ for (i = seq->len () - 1; i >= 0; i--)
+ if (htab_find (hash, seq->element (i)))
return true;
return false;
}
--
1.8.5.3