From d770555138f40fb929b5456b1548a92ebb60e6aa Mon Sep 17 00:00:00 2001 From: Diego Novillo Date: Tue, 13 Nov 2007 10:20:40 -0500 Subject: pr 33870 pr 33870 * tree.h (strcut tree_memory_tag): add field unpartitionable. remove field in_nested_struct. (struct tree_struct_field_tag): add field nesting_level. (sft_in_nested_struct): remove. (sft_nesting_level): define. (sft_unpartitionable_p): define. * tree-ssa-alias.c (mem_sym_score): if mp->var is not partitionable, return long_max. (compute_memory_partitions): do not partition sfts marked unpartitionable. (create_sft): add argument nesting_level. set sft_nesting_level with it. update all users. (create_overlap_variables_for): show nesting level. * tree-dfa.c (dump_subvars_for): likewise. (dump_variable): likewise. show whether the sft is partitionable or not. * tree-flow.h (struct fieldoff): remove field in_nested_struct. add field nesting_level. * tree-ssa-structalias.c (struct variable_info): remove field in_nested_struct. (push_fields_onto_fieldstack): add argument nesting_level. update all users. update documentation. update pair->nesting_level with nesting_level. make recursive calls with nesting_level + 1. (set_uids_in_ptset): if an sft is added to the points-to set, mark it as unpartitionable. * tree-ssa-operands.c (ref_nesting_level): new. (add_vars_for_offset): call it. add argument full_ref. update callers. if var is inside a nested structure and the nesting level of full_ref is lower than the nesting level of var, adjust offset by the offset of var. testsuite/ChangeLog PR 33870 * gcc.c-torture/execute/pr33870-1.c: New test. * gcc.dg/tree-ssa/alias-16.c: New test. From-SVN: r130141 --- gcc/tree-dfa.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'gcc/tree-dfa.c') diff --git a/gcc/tree-dfa.c b/gcc/tree-dfa.c index 4880e83..65a32d9 100644 --- a/gcc/tree-dfa.c +++ b/gcc/tree-dfa.c @@ -287,7 +287,9 @@ dump_subvars_for (FILE *file, tree var) for (i = 0; VEC_iterate (tree, sv, i, subvar); ++i) { print_generic_expr (file, subvar, dump_flags); - fprintf (file, "@" HOST_WIDE_INT_PRINT_UNSIGNED " ", SFT_OFFSET (subvar)); + fprintf (file, "@" HOST_WIDE_INT_PRINT_UNSIGNED, SFT_OFFSET (subvar)); + fprintf (file, "[%u]", SFT_NESTING_LEVEL (subvar)); + fprintf (file, " "); } fprintf (file, "}"); @@ -417,6 +419,15 @@ dump_variable (FILE *file, tree var) fprintf (file, ", partition symbols: "); dump_decl_set (file, MPT_SYMBOLS (var)); } + + if (TREE_CODE (var) == STRUCT_FIELD_TAG) + { + fprintf (file, ", offset: " HOST_WIDE_INT_PRINT_UNSIGNED, + SFT_OFFSET (var)); + fprintf (file, ", nesting: %u", SFT_NESTING_LEVEL (var)); + fprintf (file, ", partitionable: %s", + SFT_UNPARTITIONABLE_P (var) ? "NO" : "YES"); + } } fprintf (file, "\n"); -- cgit v1.1