diff options
author | Steven Bosscher <steven@gcc.gnu.org> | 2013-04-09 15:02:41 +0000 |
---|---|---|
committer | Steven Bosscher <steven@gcc.gnu.org> | 2013-04-09 15:02:41 +0000 |
commit | a949cf1c752e2a711c1794e8f511f118ab927b40 (patch) | |
tree | 78c131deabe6c46e9291c59117a110435fec542e | |
parent | 48eecbeeb808ae9dc4e2d6a43298452d8cb670cc (diff) | |
download | gcc-a949cf1c752e2a711c1794e8f511f118ab927b40.zip gcc-a949cf1c752e2a711c1794e8f511f118ab927b40.tar.gz gcc-a949cf1c752e2a711c1794e8f511f118ab927b40.tar.bz2 |
sched-vis.c (print_pattern): Print SEQUENCE of insns as insns.
* sched-vis.c (print_pattern): Print SEQUENCE of insns as insns.
From-SVN: r197640
-rw-r--r-- | gcc/ChangeLog | 2 | ||||
-rw-r--r-- | gcc/sched-vis.c | 31 |
2 files changed, 28 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6fa36f9..6181c67 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,7 @@ 2013-04-09 Steven Bosscher <steven@gcc.gnu.org> + * sched-vis.c (print_pattern): Print SEQUENCE of insns as insns. + * config/sparc/sparc.md: Use define_c_enum for "unspec" and "unspecv". 2013-04-09 Marek Polacek <polacek@redhat.com> diff --git a/gcc/sched-vis.c b/gcc/sched-vis.c index 1dc1420..763230c 100644 --- a/gcc/sched-vis.c +++ b/gcc/sched-vis.c @@ -51,6 +51,9 @@ along with GCC; see the file COPYING3. If not see static bool rtl_slim_pp_initialized = false; static pretty_printer rtl_slim_pp; +/* For insns we print patterns, and for some patterns we print insns... */ +static void print_insn_with_notes (pretty_printer *, const_rtx); + /* This recognizes rtx'en classified as expressions. These are always represent some action on values or results of other expression, that may be stored in objects representing values. */ @@ -562,13 +565,31 @@ print_pattern (pretty_printer *pp, const_rtx x, int verbose) break; case SEQUENCE: { - int i; - pp_string (pp, "sequence{"); - for (i = 0; i < XVECLEN (x, 0); i++) + if (INSN_P (XVECEXP (x, 0, 0))) { - print_pattern (pp, XVECEXP (x, 0, i), verbose); - pp_character (pp, ';'); + /* Print the sequence insns indented. */ + const char * save_print_rtx_head = print_rtx_head; + char indented_print_rtx_head[32]; + + pp_newline (pp); + gcc_assert (strlen (print_rtx_head) < sizeof (indented_print_rtx_head) - 4); + snprintf (indented_print_rtx_head, + 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)); + 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++) + { + print_pattern (pp, XVECEXP (x, 0, i), verbose); + pp_character (pp, ';'); + } } pp_character (pp, '}'); } |