diff options
author | David Malcolm <dmalcolm@redhat.com> | 2014-08-27 20:26:27 +0000 |
---|---|---|
committer | David Malcolm <dmalcolm@gcc.gnu.org> | 2014-08-27 20:26:27 +0000 |
commit | b302a90fada9feb35546adda9408d2bfc0a9af7d (patch) | |
tree | 754c9c280cfbf702d43cf205b78805570923c7ce /gcc/sched-vis.c | |
parent | a3be187d610ce71528decf216eb1f7410a5dc8ae (diff) | |
download | gcc-b302a90fada9feb35546adda9408d2bfc0a9af7d.zip gcc-b302a90fada9feb35546adda9408d2bfc0a9af7d.tar.gz gcc-b302a90fada9feb35546adda9408d2bfc0a9af7d.tar.bz2 |
sched-vis.c: Use rtx_sequence
gcc/
2014-08-27 David Malcolm <dmalcolm@redhat.com>
* sched-vis.c (print_pattern): Within SEQUENCE case, introduce a
local "seq" via a checked cast, and use methods of rtx_sequence
to simplify the code.
From-SVN: r214599
Diffstat (limited to 'gcc/sched-vis.c')
-rw-r--r-- | gcc/sched-vis.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/sched-vis.c b/gcc/sched-vis.c index b35c137..bcce40d 100644 --- a/gcc/sched-vis.c +++ b/gcc/sched-vis.c @@ -578,8 +578,9 @@ print_pattern (pretty_printer *pp, const_rtx x, int verbose) break; case SEQUENCE: { + const rtx_sequence *seq = as_a <const rtx_sequence *> (x); pp_string (pp, "sequence{"); - if (INSN_P (XVECEXP (x, 0, 0))) + if (INSN_P (seq->element (0))) { /* Print the sequence insns indented. */ const char * save_print_rtx_head = print_rtx_head; @@ -591,16 +592,16 @@ print_pattern (pretty_printer *pp, const_rtx x, int verbose) sizeof (indented_print_rtx_head), "%s ", print_rtx_head); print_rtx_head = indented_print_rtx_head; - for (int i = 0; i < XVECLEN (x, 0); i++) - print_insn_with_notes (pp, XVECEXP (x, 0, i)); + for (int i = 0; i < seq->len (); i++) + print_insn_with_notes (pp, seq->insn (i)); pp_printf (pp, "%s ", save_print_rtx_head); print_rtx_head = save_print_rtx_head; } else { - for (int i = 0; i < XVECLEN (x, 0); i++) + for (int i = 0; i < seq->len (); i++) { - print_pattern (pp, XVECEXP (x, 0, i), verbose); + print_pattern (pp, seq->element (i), verbose); pp_semicolon (pp); } } |