aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2007-11-16 14:40:04 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2007-11-16 14:40:04 +0000
commit99739a3e63eb906c77b8acdb76d4f40485eb56fe (patch)
treeb456fc38c0a138350839b7ebdcbf56a53752ed5d /gcc/tree.h
parentbf3bde19e0bf954db21ec98ee179262ec68c5ded (diff)
downloadgcc-99739a3e63eb906c77b8acdb76d4f40485eb56fe.zip
gcc-99739a3e63eb906c77b8acdb76d4f40485eb56fe.tar.gz
gcc-99739a3e63eb906c77b8acdb76d4f40485eb56fe.tar.bz2
re PR tree-optimization/33870 (miscompiles sqlite)
2007-11-16 Richard Guenther <rguenther@suse.de> PR tree-optimization/33870 * tree.h (struct tree_memory_tag): Add base_for_components flag. (struct tree_struct_field_tag): Remove nesting_level field. (SFT_NESTING_LEVEL): Remove. (SFT_BASE_FOR_COMPONENTS_P): Add. * tree-flow.h (struct fieldoff): Remove nesting_level field. Add base_for_components flag. (push_fields_onto_fieldstack): Remove nesting_level parameter. * tree-ssa-alias.c (create_sft): Likewise. Add base_for_components parameter. (create_overlap_variables_for): Deal with it. * tree-dfa.c (dump_subvars_for): Likewise. (dump_variable): Likewise. * tree-ssa-structalias.c (push_fields_onto_fieldstack): Likewise. Set base_for_components for first elements of sub-structures. (create_variable_info_for): Handle base_for_components. (set_uids_in_ptset): Always set SFT_UNPARTITIONABLE_P for pointed-to SFTs if SFT_BASE_FOR_COMPONENTS_P is set. * tree-ssa-operands.c (ref_nesting_level): Remove. (add_vars_for_offset): Remove full_ref parameter, always add the offset of the pointed-to SFT. (add_virtual_operand): Adjust for changed signature of add_vars_for_offset. * gcc.dg/torture/pr33870.c: New testcase. From-SVN: r130231
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index 00b193f..0fb68ed 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -2557,6 +2557,10 @@ struct tree_memory_tag GTY(())
/* True if this tag has global scope. */
unsigned int is_global : 1;
+ /* True if this tag is the first field of an aggregate type that
+ can be used to find adjacent SFTs belonging to the same aggregate. */
+ unsigned int base_for_components : 1;
+
/* True if this tag should not be grouped into a memory partition. */
unsigned int unpartitionable : 1;
};
@@ -2579,23 +2583,17 @@ 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)
#define SFT_OFFSET(NODE) (STRUCT_FIELD_TAG_CHECK (NODE)->sft.offset)
#define SFT_SIZE(NODE) (STRUCT_FIELD_TAG_CHECK (NODE)->sft.size)
#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_NESTING_LEVEL(NODE) \
- (STRUCT_FIELD_TAG_CHECK (NODE)->sft.nesting_level)
#define SFT_UNPARTITIONABLE_P(NODE) \
(STRUCT_FIELD_TAG_CHECK (NODE)->sft.common.unpartitionable)
+#define SFT_BASE_FOR_COMPONENTS_P(NODE) \
+ (STRUCT_FIELD_TAG_CHECK (NODE)->sft.common.base_for_components)
/* Memory Partition Tags (MPTs) group memory symbols under one
common name for the purposes of placing memory PHI nodes. */