aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-alias.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2006-01-05 09:58:57 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2006-01-05 09:58:57 +0000
commit35ed859b0d525581e9fe771e87f24c79166832a0 (patch)
treeee642046af609460b576d110ce148485977f3ce5 /gcc/tree-ssa-alias.c
parent9220c30c89c24490d9df3439351a2ea393509d31 (diff)
downloadgcc-35ed859b0d525581e9fe771e87f24c79166832a0.zip
gcc-35ed859b0d525581e9fe771e87f24c79166832a0.tar.gz
gcc-35ed859b0d525581e9fe771e87f24c79166832a0.tar.bz2
tree-flow.h (struct fieldoff): Decompose field to type, size and decl.
2006-01-05 Richard Guenther <rguenther@suse.de> * tree-flow.h (struct fieldoff): Decompose field to type, size and decl. * tree-ssa-alias.c (create_sft): Take type as parameter. (create_overlap_variables_for): Store type, size and decl in the fieldoff structure. * tree-ssa-structalias.c (fieldoff_compare): Adjust users of struct fieldoff. (push_fields_onto_fieldstack): Likewise. (create_variable_info_for): Likewise. Use offset for the SFT name if the decl is not available. From-SVN: r109376
Diffstat (limited to 'gcc/tree-ssa-alias.c')
-rw-r--r--gcc/tree-ssa-alias.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c
index d7f12c3..5813a65 100644
--- a/gcc/tree-ssa-alias.c
+++ b/gcc/tree-ssa-alias.c
@@ -2515,14 +2515,14 @@ get_or_create_used_part_for (size_t uid)
}
-/* Create and return a structure sub-variable for field FIELD of
+/* Create and return a structure sub-variable for field type FIELD of
variable VAR. */
static tree
create_sft (tree var, tree field)
{
var_ann_t ann;
- tree subvar = create_tag_raw (STRUCT_FIELD_TAG, TREE_TYPE (field), "SFT");
+ tree subvar = create_tag_raw (STRUCT_FIELD_TAG, field, "SFT");
/* We need to copy the various flags from VAR to SUBVAR, so that
they are is_global_var iff the original variable was. */
@@ -2578,9 +2578,9 @@ create_overlap_variables_for (tree var)
for (i = 0; VEC_iterate (fieldoff_s, fieldstack, i, fo); i++)
{
- if (!DECL_SIZE (fo->field)
- || TREE_CODE (DECL_SIZE (fo->field)) != INTEGER_CST
- || TREE_CODE (TREE_TYPE (fo->field)) == ARRAY_TYPE
+ if (!fo->size
+ || TREE_CODE (fo->size) != INTEGER_CST
+ || TREE_CODE (fo->type) == ARRAY_TYPE
|| fo->offset < 0)
{
notokay = true;
@@ -2632,8 +2632,8 @@ create_overlap_variables_for (tree var)
HOST_WIDE_INT fosize;
tree currfotype;
- fosize = TREE_INT_CST_LOW (DECL_SIZE (fo->field));
- currfotype = TREE_TYPE (fo->field);
+ fosize = TREE_INT_CST_LOW (fo->size);
+ currfotype = fo->type;
/* If this field isn't in the used portion,
or it has the exact same offset and size as the last
@@ -2650,7 +2650,7 @@ create_overlap_variables_for (tree var)
sv->offset = fo->offset;
sv->size = fosize;
sv->next = *subvars;
- sv->var = create_sft (var, fo->field);
+ sv->var = create_sft (var, fo->type);
if (dump_file)
{