Commit 1a5640b4 by Kazu Hirata Committed by Kazu Hirata

alias.c (alias_sets): Change the type to VEC(alias_set_entry,gc) *.

	* alias.c (alias_sets): Change the type to
	VEC(alias_set_entry,gc) *.
	(get_alias_set_entry, new_alias_set, record_alias_subset): Use
	VEC instead of VARRAY.
	(last_alias_set): Remove.

From-SVN: r113005
parent 08c79682
...@@ -5,6 +5,12 @@ ...@@ -5,6 +5,12 @@
(REG_BASE_VALUE, find_base_value, record_set, (REG_BASE_VALUE, find_base_value, record_set,
init_alias_analysis): Use VEC instead of VARRAY. init_alias_analysis): Use VEC instead of VARRAY.
* alias.c (alias_sets): Change the type to
VEC(alias_set_entry,gc) *.
(get_alias_set_entry, new_alias_set, record_alias_subset): Use
VEC instead of VARRAY.
(last_alias_set): Remove.
2006-04-16 Roger Sayle <roger@eyesopen.com> 2006-04-16 Roger Sayle <roger@eyesopen.com>
PR target/26961 PR target/26961
......
...@@ -248,8 +248,11 @@ static bool *reg_known_equiv_p; ...@@ -248,8 +248,11 @@ static bool *reg_known_equiv_p;
NOTE_INSN_FUNCTION_BEG note. */ NOTE_INSN_FUNCTION_BEG note. */
static bool copying_arguments; static bool copying_arguments;
DEF_VEC_P(alias_set_entry);
DEF_VEC_ALLOC_P(alias_set_entry,gc);
/* The splay-tree used to store the various alias set entries. */ /* The splay-tree used to store the various alias set entries. */
static GTY ((param_is (struct alias_set_entry))) varray_type alias_sets; static GTY (()) VEC(alias_set_entry,gc) *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. */
...@@ -257,7 +260,7 @@ static GTY ((param_is (struct alias_set_entry))) varray_type alias_sets; ...@@ -257,7 +260,7 @@ static GTY ((param_is (struct alias_set_entry))) varray_type alias_sets;
static inline alias_set_entry static inline alias_set_entry
get_alias_set_entry (HOST_WIDE_INT alias_set) get_alias_set_entry (HOST_WIDE_INT alias_set)
{ {
return (alias_set_entry)VARRAY_GENERIC_PTR (alias_sets, alias_set); return VEC_index (alias_set_entry, alias_sets, alias_set);
} }
/* Returns nonzero if the alias sets for MEM1 and MEM2 are such that /* Returns nonzero if the alias sets for MEM1 and MEM2 are such that
...@@ -622,18 +625,15 @@ get_alias_set (tree t) ...@@ -622,18 +625,15 @@ get_alias_set (tree t)
/* Return a brand-new alias set. */ /* Return a brand-new alias set. */
static GTY(()) HOST_WIDE_INT last_alias_set;
HOST_WIDE_INT HOST_WIDE_INT
new_alias_set (void) new_alias_set (void)
{ {
if (flag_strict_aliasing) if (flag_strict_aliasing)
{ {
if (!alias_sets) if (alias_sets == 0)
VARRAY_GENERIC_PTR_INIT (alias_sets, 10, "alias sets"); VEC_safe_push (alias_set_entry, gc, alias_sets, 0);
else VEC_safe_push (alias_set_entry, gc, alias_sets, 0);
VARRAY_GROW (alias_sets, last_alias_set + 2); return VEC_length (alias_set_entry, alias_sets) - 1;
return ++last_alias_set;
} }
else else
return 0; return 0;
...@@ -675,7 +675,7 @@ record_alias_subset (HOST_WIDE_INT superset, HOST_WIDE_INT subset) ...@@ -675,7 +675,7 @@ record_alias_subset (HOST_WIDE_INT superset, HOST_WIDE_INT subset)
superset_entry->children superset_entry->children
= splay_tree_new_ggc (splay_tree_compare_ints); = 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; VEC_replace (alias_set_entry, alias_sets, superset, superset_entry);
} }
if (subset == 0) if (subset == 0)
......
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