aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2008-07-02 14:19:15 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2008-07-02 14:19:15 +0000
commit795a337af630f9b03093c409d722f5cfe3343ddc (patch)
treec8556d5c1c4e92af0e5347bfca22ee6d595a21ab /gcc
parentc9db365d82513a3aa4993bd0c8d3554caade44b9 (diff)
downloadgcc-795a337af630f9b03093c409d722f5cfe3343ddc.zip
gcc-795a337af630f9b03093c409d722f5cfe3343ddc.tar.gz
gcc-795a337af630f9b03093c409d722f5cfe3343ddc.tar.bz2
tree-ssa-structalias.c (struct variable_info): Reorder to fill padding on 64bit hosts.
2008-07-02 Richard Guenther <rguenther@suse.de> * tree-ssa-structalias.c (struct variable_info): Reorder to fill padding on 64bit hosts. Make collapsed_to an int. (get_varinfo_fc): Deal with that. (new_var_info): Likewise. (collapse_rest_of_var): Likewise. From-SVN: r137354
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/tree-ssa-structalias.c56
2 files changed, 36 insertions, 28 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f6da145..916d1b0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2008-07-02 Richard Guenther <rguenther@suse.de>
+
+ * tree-ssa-structalias.c (struct variable_info): Reorder
+ to fill padding on 64bit hosts. Make collapsed_to an int.
+ (get_varinfo_fc): Deal with that.
+ (new_var_info): Likewise.
+ (collapse_rest_of_var): Likewise.
+
2008-07-02 Joshua Sumali <jsumali@redhat.com>
* doc/install.texi (--enable-java-home): Document.
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index e2b90c8..5531256 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -209,24 +209,6 @@ struct variable_info
/* ID of this variable */
unsigned int id;
- /* Name of this variable */
- const char *name;
-
- /* Tree that this variable is associated with. */
- tree decl;
-
- /* Offset of this variable, in bits, from the base variable */
- unsigned HOST_WIDE_INT offset;
-
- /* Size of the variable, in bits. */
- unsigned HOST_WIDE_INT size;
-
- /* Full size of the base variable, in bits. */
- unsigned HOST_WIDE_INT fullsize;
-
- /* A link to the variable for the next field in this structure. */
- struct variable_info *next;
-
/* True if this is a variable created by the constraint analysis, such as
heap variables and constraints we had to break up. */
unsigned int is_artificial_var:1;
@@ -248,16 +230,34 @@ struct variable_info
variable. This is used for C++ placement new. */
unsigned int no_tbaa_pruning : 1;
+ /* Variable id this was collapsed to due to type unsafety. Zero if
+ this variable was not collapsed. This should be unused completely
+ after build_succ_graph, or something is broken. */
+ unsigned int collapsed_to;
+
+ /* A link to the variable for the next field in this structure. */
+ struct variable_info *next;
+
+ /* Offset of this variable, in bits, from the base variable */
+ unsigned HOST_WIDE_INT offset;
+
+ /* Size of the variable, in bits. */
+ unsigned HOST_WIDE_INT size;
+
+ /* Full size of the base variable, in bits. */
+ unsigned HOST_WIDE_INT fullsize;
+
+ /* Name of this variable */
+ const char *name;
+
+ /* Tree that this variable is associated with. */
+ tree decl;
+
/* Points-to set for this variable. */
bitmap solution;
/* Old points-to set for this variable. */
bitmap oldsolution;
-
- /* Variable id this was collapsed to due to type unsafety. This
- should be unused completely after build_succ_graph, or something
- is broken. */
- struct variable_info *collapsed_to;
};
typedef struct variable_info *varinfo_t;
@@ -289,8 +289,8 @@ get_varinfo_fc (unsigned int n)
{
varinfo_t v = VEC_index (varinfo_t, varmap, n);
- if (v->collapsed_to)
- return v->collapsed_to;
+ if (v->collapsed_to != 0)
+ return get_varinfo (v->collapsed_to);
return v;
}
@@ -385,7 +385,7 @@ new_var_info (tree t, unsigned int id, const char *name)
ret->solution = BITMAP_ALLOC (&pta_obstack);
ret->oldsolution = BITMAP_ALLOC (&oldpta_obstack);
ret->next = NULL;
- ret->collapsed_to = NULL;
+ ret->collapsed_to = 0;
return ret;
}
@@ -3123,8 +3123,8 @@ collapse_rest_of_var (unsigned int var)
fprintf (dump_file, "Type safety: Collapsing var %s into %s\n",
field->name, currvar->name);
- gcc_assert (!field->collapsed_to);
- field->collapsed_to = currvar;
+ gcc_assert (field->collapsed_to == 0);
+ field->collapsed_to = currvar->id;
}
currvar->next = NULL;