From: David Malcolm Date: Wed, 27 Aug 2014 20:06:47 +0000 (+0000) Subject: function.c: Use rtx_sequence X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e0944870710b48ad98e10e17ac0ae23995947573;p=gcc.git function.c: Use rtx_sequence gcc/ 2014-08-27 David Malcolm * 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. From-SVN: r214595 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c8b68a2ce95..8b33726443b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2014-08-27 David Malcolm + + * 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. + 2014-08-27 David Malcolm * final.c (get_attr_length_1): Replace GET_CODE check with a diff --git a/gcc/function.c b/gcc/function.c index 25f1519a93e..6023d69800a 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -5335,9 +5335,10 @@ contains (const_rtx insn, htab_t hash) if (NONJUMP_INSN_P (insn) && GET_CODE (PATTERN (insn)) == SEQUENCE) { + rtx_sequence *seq = as_a (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; }