diff options
author | David Malcolm <dmalcolm@redhat.com> | 2014-08-27 20:28:31 +0000 |
---|---|---|
committer | David Malcolm <dmalcolm@gcc.gnu.org> | 2014-08-27 20:28:31 +0000 |
commit | 30db48d9d22e04e7270ba5b204fa74f4c8f9f5e3 (patch) | |
tree | 41e63d939299bb2a9e5f0bc2d6289190f59b6673 /gcc/varasm.c | |
parent | b302a90fada9feb35546adda9408d2bfc0a9af7d (diff) | |
download | gcc-30db48d9d22e04e7270ba5b204fa74f4c8f9f5e3.zip gcc-30db48d9d22e04e7270ba5b204fa74f4c8f9f5e3.tar.gz gcc-30db48d9d22e04e7270ba5b204fa74f4c8f9f5e3.tar.bz2 |
varasm.c: Use rtx_sequence
gcc/
2014-08-27 David Malcolm <dmalcolm@redhat.com>
* varasm.c (mark_constants): Convert a GET_CODE check into a
dyn_cast, strengthening local "seq" from rtx to rtx_sequence *.
Use methods of rtx_sequence to clarify the code.
From-SVN: r214600
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r-- | gcc/varasm.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c index ce99a13..f2d5a26 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -3928,13 +3928,12 @@ mark_constants (rtx_insn *insn) /* Insns may appear inside a SEQUENCE. Only check the patterns of insns, not any notes that may be attached. We don't want to mark a constant just because it happens to appear in a REG_EQUIV note. */ - if (GET_CODE (PATTERN (insn)) == SEQUENCE) + if (rtx_sequence *seq = dyn_cast <rtx_sequence *> (PATTERN (insn))) { - rtx seq = PATTERN (insn); - int i, n = XVECLEN (seq, 0); + int i, n = seq->len (); for (i = 0; i < n; ++i) { - rtx subinsn = XVECEXP (seq, 0, i); + rtx subinsn = seq->element (i); if (INSN_P (subinsn)) for_each_rtx (&PATTERN (subinsn), mark_constant, NULL); } |