aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-pretty-print.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2010-04-16 09:49:20 +0000
committerRichard Guenther <rguenther@suse.de>2010-04-16 09:49:20 +0000
commit34d6ede29a48199a77bb5234d45118bad831a8eb (patch)
tree4fc0ac78bd4c7e6ae931e0305a8d4324c1450344 /gcc/gimple-pretty-print.c
parentf72c8b5744105193b636900b0ca6420156618887 (diff)
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: https://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.c27
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: