Commit 795a337a by Richard Guenther Committed by Richard Biener

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
parent c9db365d
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> 2008-07-02 Joshua Sumali <jsumali@redhat.com>
* doc/install.texi (--enable-java-home): Document. * doc/install.texi (--enable-java-home): Document.
......
...@@ -209,24 +209,6 @@ struct variable_info ...@@ -209,24 +209,6 @@ struct variable_info
/* ID of this variable */ /* ID of this variable */
unsigned int id; 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 /* True if this is a variable created by the constraint analysis, such as
heap variables and constraints we had to break up. */ heap variables and constraints we had to break up. */
unsigned int is_artificial_var:1; unsigned int is_artificial_var:1;
...@@ -248,16 +230,34 @@ struct variable_info ...@@ -248,16 +230,34 @@ struct variable_info
variable. This is used for C++ placement new. */ variable. This is used for C++ placement new. */
unsigned int no_tbaa_pruning : 1; 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. */ /* Points-to set for this variable. */
bitmap solution; bitmap solution;
/* Old points-to set for this variable. */ /* Old points-to set for this variable. */
bitmap oldsolution; 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; typedef struct variable_info *varinfo_t;
...@@ -289,8 +289,8 @@ get_varinfo_fc (unsigned int n) ...@@ -289,8 +289,8 @@ get_varinfo_fc (unsigned int n)
{ {
varinfo_t v = VEC_index (varinfo_t, varmap, n); varinfo_t v = VEC_index (varinfo_t, varmap, n);
if (v->collapsed_to) if (v->collapsed_to != 0)
return v->collapsed_to; return get_varinfo (v->collapsed_to);
return v; return v;
} }
...@@ -385,7 +385,7 @@ new_var_info (tree t, unsigned int id, const char *name) ...@@ -385,7 +385,7 @@ new_var_info (tree t, unsigned int id, const char *name)
ret->solution = BITMAP_ALLOC (&pta_obstack); ret->solution = BITMAP_ALLOC (&pta_obstack);
ret->oldsolution = BITMAP_ALLOC (&oldpta_obstack); ret->oldsolution = BITMAP_ALLOC (&oldpta_obstack);
ret->next = NULL; ret->next = NULL;
ret->collapsed_to = NULL; ret->collapsed_to = 0;
return ret; return ret;
} }
...@@ -3123,8 +3123,8 @@ collapse_rest_of_var (unsigned int var) ...@@ -3123,8 +3123,8 @@ collapse_rest_of_var (unsigned int var)
fprintf (dump_file, "Type safety: Collapsing var %s into %s\n", fprintf (dump_file, "Type safety: Collapsing var %s into %s\n",
field->name, currvar->name); field->name, currvar->name);
gcc_assert (!field->collapsed_to); gcc_assert (field->collapsed_to == 0);
field->collapsed_to = currvar; field->collapsed_to = currvar->id;
} }
currvar->next = NULL; currvar->next = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment