aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-pretty-print.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2010-08-12 10:36:08 +0000
committerRichard Guenther <rguenther@suse.de>2010-08-12 10:36:08 +0000
commit652e70d2cf962a71b1054933ad8fe018180947af (patch)
tree9a3a2a1cd2ab3e673bfae829eadbac8146e824a5 /gcc/gimple-pretty-print.c
parente8ebb89136292298fb660f2d0074ca2f6936bca6 (diff)
2010-08-12 Richard Guenther <rguenther@suse.de>
* tree-flow.h (struct ptr_info_def): Add align and misalign fields. * tree-ssa-alias.c (get_ptr_info): Move ... * tree-ssanames.c (get_ptr_info): ... here. Initialize align and misalign fields conservatively. * tree-ssa-ccp.c (ccp_finalize): From partially constant pointers derive alignment information. (evaluate_stmt): Derive alignment information from memory allocation functions. * tree.h (get_pointer_alignment): Make unsigned. * builtins.c (get_object_alignment): Use alignment information we have computed for pointers. (get_pointer_alignment): Likewise. Make conservative, return and unsigned value. (expand_builtin_strlen): Adjust. (expand_builtin_memcmp): Likewise. (expand_builtin_strcmp): Likewise. (expand_builtin_strncmp): Likewise. (get_builtin_sync_mem): Use at least mode alignment. (fold_builtin_memset): Adjust. (fold_builtin_memory_op): Likewise. * gimple-pretty-print.c (dump_gimple_phi): Alongside alias information also dump pointer alignment knowledge. (dump_gimple_stmt): Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@163189 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimple-pretty-print.c')
-rw-r--r--gcc/gimple-pretty-print.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/gcc/gimple-pretty-print.c b/gcc/gimple-pretty-print.c
index 6e1f6b782c2..941d3236eea 100644
--- a/gcc/gimple-pretty-print.c
+++ b/gcc/gimple-pretty-print.c
@@ -1363,8 +1363,13 @@ dump_gimple_phi (pretty_printer *buffer, gimple phi, int spc, int flags)
&& POINTER_TYPE_P (TREE_TYPE (lhs))
&& SSA_NAME_PTR_INFO (lhs))
{
+ struct ptr_info_def *pi = SSA_NAME_PTR_INFO (lhs);
pp_string (buffer, "PT = ");
- pp_points_to_solution (buffer, &SSA_NAME_PTR_INFO (lhs)->pt);
+ pp_points_to_solution (buffer, &pi->pt);
+ newline_and_indent (buffer, spc);
+ if (pi->align != 1)
+ pp_printf (buffer, "# ALIGN = %u, MISALIGN = %u",
+ pi->align, pi->misalign);
newline_and_indent (buffer, spc);
pp_string (buffer, "# ");
}
@@ -1650,9 +1655,16 @@ dump_gimple_stmt (pretty_printer *buffer, gimple gs, int spc, int flags)
&& POINTER_TYPE_P (TREE_TYPE (lhs))
&& SSA_NAME_PTR_INFO (lhs))
{
+ struct ptr_info_def *pi = SSA_NAME_PTR_INFO (lhs);
pp_string (buffer, "# PT = ");
- pp_points_to_solution (buffer, &SSA_NAME_PTR_INFO (lhs)->pt);
+ pp_points_to_solution (buffer, &pi->pt);
newline_and_indent (buffer, spc);
+ if (pi->align != 1)
+ {
+ pp_printf (buffer, "# ALIGN = %u, MISALIGN = %u",
+ pi->align, pi->misalign);
+ newline_and_indent (buffer, spc);
+ }
}
}