diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-02 14:19:15 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-02 14:19:15 +0000 |
commit | 7b879cb3e34643fafa242818e58f6022d849d93a (patch) | |
tree | c8556d5c1c4e92af0e5347bfca22ee6d595a21ab | |
parent | 4aba1ac0d8d8d5486ac1ea5791c6378fa02a41ce (diff) | |
download | gcc-7b879cb3e34643fafa242818e58f6022d849d93a.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@137354 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/tree-ssa-structalias.c | 56 |
2 files changed, 36 insertions, 28 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f6da145f815..916d1b0244a 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 e2b90c86b2e..553125641ce 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; |