diff options
author | Richard Guenther <rguenther@suse.de> | 2010-04-16 09:49:20 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2010-04-16 09:49:20 +0000 |
commit | f010714542825d385d6b06313c72a64ae1184800 (patch) | |
tree | 4fc0ac78bd4c7e6ae931e0305a8d4324c1450344 /gcc | |
parent | 3302cfa12afe2086b0cc16a4c3f4610dd994497c (diff) | |
download | gcc-f010714542825d385d6b06313c72a64ae1184800.zip gcc-f010714542825d385d6b06313c72a64ae1184800.tar.gz gcc-f010714542825d385d6b06313c72a64ae1184800.tar.bz2 |
gimple-pretty-print.c (dump_gimple_phi): Dump alias info.
2010-04-16 Richard Guenther <rguenther@suse.de>
* gimple-pretty-print.c (dump_gimple_phi): Dump alias info.
(dump_gimple_stmt): Likewise.
From-SVN: r158406
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/gimple-pretty-print.c | 27 |
2 files changed, 31 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a3bb0b0..bca40b7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2010-04-16 Richard Guenther <rguenther@suse.de> + + * gimple-pretty-print.c (dump_gimple_phi): Dump alias info. + (dump_gimple_stmt): Likewise. + 2010-04-16 Bernd Schmidt <bernd.schmidt@codesourcery.com> * recog.h (struct recog_data): New field is_operator. diff --git a/gcc/gimple-pretty-print.c b/gcc/gimple-pretty-print.c index 0f38616..c9a9242 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: |