Commit b604074c by Geoffrey Keating Committed by Geoffrey Keating

re PR pch/13689 (GGC PCH breaks aliasing)

	PR pch/13689
	* alias.c (struct alias_set_entry): Mark for GC.
	(alias_sets): Make static, mark for GC.
	(record_alias_subset): Use GC to allocate alias structures.
	* varray.c (element): Make generic varrays GCed.

From-SVN: r75962
parent a6dd4094
2004-01-15 Geoffrey Keating <geoffk@apple.com> 2004-01-15 Geoffrey Keating <geoffk@apple.com>
PR pch/13689
* alias.c (struct alias_set_entry): Mark for GC.
(alias_sets): Make static, mark for GC.
(record_alias_subset): Use GC to allocate alias structures.
* varray.c (element): Make generic varrays GCed.
PR pch/13361 PR pch/13361
* c-typeck.c (constructor_asmspec): Delete. * c-typeck.c (constructor_asmspec): Delete.
(struct initializer_stack): Delete field 'asmspec'. (struct initializer_stack): Delete field 'asmspec'.
......
...@@ -74,7 +74,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -74,7 +74,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
However, this is no actual entry for alias set zero. It is an However, this is no actual entry for alias set zero. It is an
error to attempt to explicitly construct a subset of zero. */ error to attempt to explicitly construct a subset of zero. */
typedef struct alias_set_entry struct alias_set_entry GTY(())
{ {
/* The alias set number, as stored in MEM_ALIAS_SET. */ /* The alias set number, as stored in MEM_ALIAS_SET. */
HOST_WIDE_INT alias_set; HOST_WIDE_INT alias_set;
...@@ -86,12 +86,13 @@ typedef struct alias_set_entry ...@@ -86,12 +86,13 @@ typedef struct alias_set_entry
continuing our example above, the children here will be all of continuing our example above, the children here will be all of
`int', `double', `float', and `struct S'. */ `int', `double', `float', and `struct S'. */
splay_tree children; splay_tree GTY((param1_is (int), param2_is (int))) children;
/* Nonzero if would have a child of zero: this effectively makes this /* Nonzero if would have a child of zero: this effectively makes this
alias set the same as alias set zero. */ alias set the same as alias set zero. */
int has_zero_child; int has_zero_child;
} *alias_set_entry; };
typedef struct alias_set_entry *alias_set_entry;
static int rtx_equal_for_memref_p (rtx, rtx); static int rtx_equal_for_memref_p (rtx, rtx);
static rtx find_symbolic_term (rtx); static rtx find_symbolic_term (rtx);
...@@ -206,7 +207,7 @@ char *reg_known_equiv_p; ...@@ -206,7 +207,7 @@ char *reg_known_equiv_p;
static bool copying_arguments; static bool copying_arguments;
/* The splay-tree used to store the various alias set entries. */ /* The splay-tree used to store the various alias set entries. */
varray_type alias_sets; static GTY ((param_is (struct alias_set_entry))) varray_type alias_sets;
/* Returns a pointer to the alias set entry for ALIAS_SET, if there is /* Returns a pointer to the alias set entry for ALIAS_SET, if there is
such an entry, or NULL otherwise. */ such an entry, or NULL otherwise. */
...@@ -640,10 +641,10 @@ record_alias_subset (HOST_WIDE_INT superset, HOST_WIDE_INT subset) ...@@ -640,10 +641,10 @@ record_alias_subset (HOST_WIDE_INT superset, HOST_WIDE_INT subset)
{ {
/* Create an entry for the SUPERSET, so that we have a place to /* Create an entry for the SUPERSET, so that we have a place to
attach the SUBSET. */ attach the SUBSET. */
superset_entry = xmalloc (sizeof (struct alias_set_entry)); superset_entry = ggc_alloc (sizeof (struct alias_set_entry));
superset_entry->alias_set = superset; superset_entry->alias_set = superset;
superset_entry->children superset_entry->children
= splay_tree_new (splay_tree_compare_ints, 0, 0); = splay_tree_new_ggc (splay_tree_compare_ints);
superset_entry->has_zero_child = 0; superset_entry->has_zero_child = 0;
VARRAY_GENERIC_PTR (alias_sets, superset) = superset_entry; VARRAY_GENERIC_PTR (alias_sets, superset) = superset_entry;
} }
......
...@@ -30,8 +30,8 @@ ...@@ -30,8 +30,8 @@
#define VARRAY_HDR_SIZE (sizeof (struct varray_head_tag) - sizeof (varray_data)) #define VARRAY_HDR_SIZE (sizeof (struct varray_head_tag) - sizeof (varray_data))
/* Do not add any more non-GC items here. Please either remove or GC those items that /* Do not add any more non-GC items here. Please either remove or GC
are not GCed. */ those items that are not GCed. */
static const struct { static const struct {
unsigned char size; unsigned char size;
...@@ -47,7 +47,7 @@ static const struct { ...@@ -47,7 +47,7 @@ static const struct {
{ sizeof (unsigned long), 1 }, { sizeof (unsigned long), 1 },
{ sizeof (HOST_WIDE_INT), 1 }, { sizeof (HOST_WIDE_INT), 1 },
{ sizeof (unsigned HOST_WIDE_INT), 1 }, { sizeof (unsigned HOST_WIDE_INT), 1 },
{ sizeof (void *), 0 }, { sizeof (void *), 1 },
{ sizeof (char *), 1 }, { sizeof (char *), 1 },
{ sizeof (struct rtx_def *), 1 }, { sizeof (struct rtx_def *), 1 },
{ sizeof (struct rtvec_def *), 1 }, { sizeof (struct rtvec_def *), 1 },
......
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