diff options
author | Martin Liska <mliska@suse.cz> | 2017-07-31 10:54:05 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2017-07-31 08:54:05 +0000 |
commit | 5edb1c48f8e526a2b8f7f9d03fce9a7fdcb14b88 (patch) | |
tree | 1201645f0a06438d350f307006cd61246b1b0ecd /gcc/gimple-pretty-print.c | |
parent | f34ebeb25ef25e5937f60b7e6115c3f693a12ac3 (diff) | |
download | gcc-5edb1c48f8e526a2b8f7f9d03fce9a7fdcb14b88.zip gcc-5edb1c48f8e526a2b8f7f9d03fce9a7fdcb14b88.tar.gz gcc-5edb1c48f8e526a2b8f7f9d03fce9a7fdcb14b88.tar.bz2 |
Learn GIMPLE pretty printer to produce nicer dump output.
2017-07-31 Martin Liska <mliska@suse.cz>
* gimple-pretty-print.c (dump_gimple_label): Never dump
BB info.
(dump_gimple_bb_header): Always dump BB info.
(pp_cfg_jump): Do not append info about BB when dumping a jump.
2017-07-31 Martin Liska <mliska@suse.cz>
* gcc.dg/builtin-unreachable-6.c: Update scanned patterns.
* gcc.dg/tree-ssa/attr-hotcold-2.c: Likewise.
From-SVN: r250731
Diffstat (limited to 'gcc/gimple-pretty-print.c')
-rw-r--r-- | gcc/gimple-pretty-print.c | 33 |
1 files changed, 7 insertions, 26 deletions
diff --git a/gcc/gimple-pretty-print.c b/gcc/gimple-pretty-print.c index c8eb9c4..8b69b72 100644 --- a/gcc/gimple-pretty-print.c +++ b/gcc/gimple-pretty-print.c @@ -1120,9 +1120,6 @@ dump_gimple_label (pretty_printer *buffer, glabel *gs, int spc, else { dump_generic_node (buffer, label, spc, flags, false); - basic_block bb = gimple_bb (gs); - if (bb && !(flags & TDF_GIMPLE)) - pp_scalar (buffer, " %s", dump_profile (bb->frequency, bb->count)); pp_colon (buffer); } if (flags & TDF_GIMPLE) @@ -2695,16 +2692,12 @@ dump_gimple_bb_header (FILE *outf, basic_block bb, int indent, } else { - gimple *stmt = first_stmt (bb); - if (!stmt || gimple_code (stmt) != GIMPLE_LABEL) - { - if (flags & TDF_GIMPLE) - fprintf (outf, "%*sbb_%d:\n", indent, "", bb->index); - else - fprintf (outf, "%*s<bb %d> %s:\n", - indent, "", bb->index, dump_profile (bb->frequency, - bb->count)); - } + if (flags & TDF_GIMPLE) + fprintf (outf, "%*sbb_%d:\n", indent, "", bb->index); + else + fprintf (outf, "%*s<bb %d> %s:\n", + indent, "", bb->index, dump_profile (bb->frequency, + bb->count)); } } @@ -2760,22 +2753,10 @@ pp_cfg_jump (pretty_printer *buffer, edge e, dump_flags_t flags) } else { - gimple *stmt = first_stmt (e->dest); - pp_string (buffer, "goto <bb "); pp_decimal_int (buffer, e->dest->index); pp_greater (buffer); - if (stmt && gimple_code (stmt) == GIMPLE_LABEL) - { - pp_string (buffer, " ("); - dump_generic_node (buffer, - gimple_label_label (as_a <glabel *> (stmt)), - 0, 0, false); - pp_right_paren (buffer); - pp_semicolon (buffer); - } - else - pp_semicolon (buffer); + pp_semicolon (buffer); dump_edge_probability (buffer, e); } |