aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorDiego Novillo <dnovillo@gcc.gnu.org>2007-11-13 10:20:40 -0500
committerDiego Novillo <dnovillo@gcc.gnu.org>2007-11-13 10:20:40 -0500
commitd770555138f40fb929b5456b1548a92ebb60e6aa (patch)
treeb04ec56bade931807b6ed40c6d251c05aa588f0b /gcc/tree.h
parent0e506c4b4f1efe03e05b80fbc09bb77f474372a1 (diff)
downloadgcc-d770555138f40fb929b5456b1548a92ebb60e6aa.zip
gcc-d770555138f40fb929b5456b1548a92ebb60e6aa.tar.gz
gcc-d770555138f40fb929b5456b1548a92ebb60e6aa.tar.bz2
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
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index decc05d..00b193f 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -2555,10 +2555,10 @@ struct tree_memory_tag GTY(())
bitmap GTY ((skip)) aliases;
/* True if this tag has global scope. */
- unsigned int is_global:1;
+ unsigned int is_global : 1;
- /* True if this SFT is for a field in a nested structure. */
- unsigned int in_nested_struct : 1;
+ /* True if this tag should not be grouped into a memory partition. */
+ unsigned int unpartitionable : 1;
};
#define MTAG_GLOBAL(NODE) (TREE_MEMORY_TAG_CHECK (NODE)->mtag.is_global)
@@ -2579,6 +2579,11 @@ struct tree_struct_field_tag GTY(())
/* Alias set for a DECL_NONADDRESSABLE_P field. Otherwise -1. */
alias_set_type alias_set;
+
+ /* Nesting level for this subvariable. This indicates how many
+ structures are wrapping this field. Fields at the top level have
+ a nesting level of 0. */
+ unsigned int nesting_level;
};
#define SFT_PARENT_VAR(NODE) (STRUCT_FIELD_TAG_CHECK (NODE)->sft.parent_var)
@@ -2587,8 +2592,10 @@ struct tree_struct_field_tag GTY(())
#define SFT_NONADDRESSABLE_P(NODE) \
(STRUCT_FIELD_TAG_CHECK (NODE)->sft.alias_set != -1)
#define SFT_ALIAS_SET(NODE) (STRUCT_FIELD_TAG_CHECK (NODE)->sft.alias_set)
-#define SFT_IN_NESTED_STRUCT(NODE) \
- (STRUCT_FIELD_TAG_CHECK (NODE)->sft.common.in_nested_struct)
+#define SFT_NESTING_LEVEL(NODE) \
+ (STRUCT_FIELD_TAG_CHECK (NODE)->sft.nesting_level)
+#define SFT_UNPARTITIONABLE_P(NODE) \
+ (STRUCT_FIELD_TAG_CHECK (NODE)->sft.common.unpartitionable)
/* Memory Partition Tags (MPTs) group memory symbols under one
common name for the purposes of placing memory PHI nodes. */