diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-04-16 09:49:20 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-04-16 09:49:20 +0000 |
commit | 71e1184340f93a62ab666edf7526a50550b3c8aa (patch) | |
tree | 4fc0ac78bd4c7e6ae931e0305a8d4324c1450344 /gcc/gimple-pretty-print.c | |
parent | 956a617049d0537c1549bf09a58356b63de28ffa (diff) | |
download | gcc-71e1184340f93a62ab666edf7526a50550b3c8aa.tar.gz |
2010-04-16 Richard Guenther <rguenther@suse.de>
* gimple-pretty-print.c (dump_gimple_phi): Dump alias info.
(dump_gimple_stmt): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158406 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimple-pretty-print.c')
-rw-r--r-- | gcc/gimple-pretty-print.c | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/gcc/gimple-pretty-print.c b/gcc/gimple-pretty-print.c index 0f386163ab3..c9a9242e3ca 100644 --- a/gcc/gimple-pretty-print.c +++ b/gcc/gimple-pretty-print.c @@ -1330,13 +1330,24 @@ static void dump_gimple_phi (pretty_printer *buffer, gimple phi, int spc, int flags) { size_t i; + tree lhs = gimple_phi_result (phi); + + if (flags & TDF_ALIAS + && POINTER_TYPE_P (TREE_TYPE (lhs)) + && SSA_NAME_PTR_INFO (lhs)) + { + pp_string (buffer, "PT = "); + pp_points_to_solution (buffer, &SSA_NAME_PTR_INFO (lhs)->pt); + newline_and_indent (buffer, spc); + pp_string (buffer, "# "); + } if (flags & TDF_RAW) dump_gimple_fmt (buffer, spc, flags, "%G <%T, ", phi, gimple_phi_result (phi)); else { - dump_generic_node (buffer, gimple_phi_result (phi), spc, flags, false); + dump_generic_node (buffer, lhs, spc, flags, false); pp_string (buffer, " = PHI <"); } for (i = 0; i < gimple_phi_num_args (phi); i++) @@ -1604,6 +1615,20 @@ dump_gimple_stmt (pretty_printer *buffer, gimple gs, int spc, int flags) && gimple_has_mem_ops (gs)) dump_gimple_mem_ops (buffer, gs, spc, flags); + if ((flags & TDF_ALIAS) + && gimple_has_lhs (gs)) + { + tree lhs = gimple_get_lhs (gs); + if (TREE_CODE (lhs) == SSA_NAME + && POINTER_TYPE_P (TREE_TYPE (lhs)) + && SSA_NAME_PTR_INFO (lhs)) + { + pp_string (buffer, "# PT = "); + pp_points_to_solution (buffer, &SSA_NAME_PTR_INFO (lhs)->pt); + newline_and_indent (buffer, spc); + } + } + switch (gimple_code (gs)) { case GIMPLE_ASM: |