Commit d09c0e9b by Jakub Jelinek Committed by Jakub Jelinek

gimple-pretty-print.c (dump_ssaname_info): Always print "# " before the info, not after it.

	* gimple-pretty-print.c (dump_ssaname_info): Always print "# " before
	the info, not after it.
	(gump_gimple_phi): Add COMMENT argument, if true, print "# " after
	dump_ssaname_info call.
	(pp_gimple_stmt_1): Adjust caller.
	(dump_phi_nodes): Likewise.  Don't print "# " here.

From-SVN: r203947
parent 3d54e576
2013-10-23 Jakub Jelinek <jakub@redhat.com>
* gimple-pretty-print.c (dump_ssaname_info): Always print "# " before
the info, not after it.
(gump_gimple_phi): Add COMMENT argument, if true, print "# " after
dump_ssaname_info call.
(pp_gimple_stmt_1): Adjust caller.
(dump_phi_nodes): Likewise. Don't print "# " here.
2013-10-22 Jan Hubicka <jh@suse.cz> 2013-10-22 Jan Hubicka <jh@suse.cz>
* i386.h (TARGET_MISALIGNED_MOVE_STRING_PROLOGUES_EPILOGUES): New tuning flag. * i386.h (TARGET_MISALIGNED_MOVE_STRING_PROLOGUES_EPILOGUES): New tuning flag.
......
...@@ -1714,7 +1714,7 @@ dump_ssaname_info (pretty_printer *buffer, tree node, int spc) ...@@ -1714,7 +1714,7 @@ dump_ssaname_info (pretty_printer *buffer, tree node, int spc)
{ {
unsigned int align, misalign; unsigned int align, misalign;
struct ptr_info_def *pi = SSA_NAME_PTR_INFO (node); struct ptr_info_def *pi = SSA_NAME_PTR_INFO (node);
pp_string (buffer, "PT = "); pp_string (buffer, "# PT = ");
pp_points_to_solution (buffer, &pi->pt); pp_points_to_solution (buffer, &pi->pt);
newline_and_indent (buffer, spc); newline_and_indent (buffer, spc);
if (get_ptr_info_alignment (pi, &align, &misalign)) if (get_ptr_info_alignment (pi, &align, &misalign))
...@@ -1722,7 +1722,6 @@ dump_ssaname_info (pretty_printer *buffer, tree node, int spc) ...@@ -1722,7 +1722,6 @@ dump_ssaname_info (pretty_printer *buffer, tree node, int spc)
pp_printf (buffer, "# ALIGN = %u, MISALIGN = %u", align, misalign); pp_printf (buffer, "# ALIGN = %u, MISALIGN = %u", align, misalign);
newline_and_indent (buffer, spc); newline_and_indent (buffer, spc);
} }
pp_string (buffer, "# ");
} }
if (!POINTER_TYPE_P (TREE_TYPE (node)) if (!POINTER_TYPE_P (TREE_TYPE (node))
...@@ -1749,10 +1748,11 @@ dump_ssaname_info (pretty_printer *buffer, tree node, int spc) ...@@ -1749,10 +1748,11 @@ dump_ssaname_info (pretty_printer *buffer, tree node, int spc)
/* Dump a PHI node PHI. BUFFER, SPC and FLAGS are as in pp_gimple_stmt_1. /* Dump a PHI node PHI. BUFFER, SPC and FLAGS are as in pp_gimple_stmt_1.
The caller is responsible for calling pp_flush on BUFFER to finalize The caller is responsible for calling pp_flush on BUFFER to finalize
pretty printer. */ pretty printer. If COMMENT is true, print this after #. */
static void static void
dump_gimple_phi (pretty_printer *buffer, gimple phi, int spc, int flags) dump_gimple_phi (pretty_printer *buffer, gimple phi, int spc, bool comment,
int flags)
{ {
size_t i; size_t i;
tree lhs = gimple_phi_result (phi); tree lhs = gimple_phi_result (phi);
...@@ -1760,6 +1760,9 @@ dump_gimple_phi (pretty_printer *buffer, gimple phi, int spc, int flags) ...@@ -1760,6 +1760,9 @@ dump_gimple_phi (pretty_printer *buffer, gimple phi, int spc, int flags)
if (flags & TDF_ALIAS) if (flags & TDF_ALIAS)
dump_ssaname_info (buffer, lhs, spc); dump_ssaname_info (buffer, lhs, spc);
if (comment)
pp_string (buffer, "# ");
if (flags & TDF_RAW) if (flags & TDF_RAW)
dump_gimple_fmt (buffer, spc, flags, "%G <%T, ", phi, dump_gimple_fmt (buffer, spc, flags, "%G <%T, ", phi,
gimple_phi_result (phi)); gimple_phi_result (phi));
...@@ -2095,7 +2098,7 @@ pp_gimple_stmt_1 (pretty_printer *buffer, gimple gs, int spc, int flags) ...@@ -2095,7 +2098,7 @@ pp_gimple_stmt_1 (pretty_printer *buffer, gimple gs, int spc, int flags)
break; break;
case GIMPLE_PHI: case GIMPLE_PHI:
dump_gimple_phi (buffer, gs, spc, flags); dump_gimple_phi (buffer, gs, spc, false, flags);
break; break;
case GIMPLE_OMP_PARALLEL: case GIMPLE_OMP_PARALLEL:
...@@ -2271,8 +2274,7 @@ dump_phi_nodes (pretty_printer *buffer, basic_block bb, int indent, int flags) ...@@ -2271,8 +2274,7 @@ dump_phi_nodes (pretty_printer *buffer, basic_block bb, int indent, int flags)
if (!virtual_operand_p (gimple_phi_result (phi)) || (flags & TDF_VOPS)) if (!virtual_operand_p (gimple_phi_result (phi)) || (flags & TDF_VOPS))
{ {
INDENT (indent); INDENT (indent);
pp_string (buffer, "# "); dump_gimple_phi (buffer, phi, indent, true, flags);
dump_gimple_phi (buffer, phi, indent, flags);
pp_newline (buffer); pp_newline (buffer);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment