X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Fgimple-pretty-print.c;h=0480f9d43967fd0bff0c9ae74b5ca4046b9e4f5d;hb=120a04de68643e4f372c546ee4d68097d39f0fe5;hp=0f386163ab3ebdc56010c3bd219f8224e3e511f5;hpb=1a981e1a975098bd537556d2b36f275f3bc075c7;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/gimple-pretty-print.c b/gcc/gimple-pretty-print.c index 0f386163ab3..0480f9d4396 100644 --- a/gcc/gimple-pretty-print.c +++ b/gcc/gimple-pretty-print.c @@ -1,5 +1,5 @@ /* Pretty formatting of GIMPLE statements and expressions. - Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 + Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. Contributed by Aldy Hernandez and Diego Novillo @@ -26,7 +26,8 @@ along with GCC; see the file COPYING3. If not see #include "tm.h" #include "tree.h" #include "diagnostic.h" -#include "real.h" +#include "tree-pretty-print.h" +#include "gimple-pretty-print.h" #include "hashtab.h" #include "tree-flow.h" #include "tree-pass.h" @@ -1330,13 +1331,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 +1616,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: