aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2014-08-27 20:06:47 +0000
committerDavid Malcolm <dmalcolm@gcc.gnu.org>2014-08-27 20:06:47 +0000
commite0944870710b48ad98e10e17ac0ae23995947573 (patch)
treea19389c4749c8e49fbe52430f4fda2410cecb69f /gcc/function.c
parente429a50b9687625fb50edbffb17355369f555366 (diff)
downloadgcc-e0944870710b48ad98e10e17ac0ae23995947573.zip
gcc-e0944870710b48ad98e10e17ac0ae23995947573.tar.gz
gcc-e0944870710b48ad98e10e17ac0ae23995947573.tar.bz2
function.c: Use rtx_sequence
gcc/ 2014-08-27 David Malcolm <dmalcolm@redhat.com> * 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
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/function.c b/gcc/function.c
index 25f1519..6023d69 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 <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;
}