aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-alias.c
diff options
context:
space:
mode:
authorSteven Bosscher <stevenb@suse.de>2004-11-12 00:08:41 +0000
committerSteven Bosscher <steven@gcc.gnu.org>2004-11-12 00:08:41 +0000
commitd0ce8e4c9772b478f7ce3088a46c5824c9c83c5a (patch)
tree549c93fd7b517405b6cf8a6a87d32d1556f8e140 /gcc/tree-ssa-alias.c
parent903676f62fc20f2bf6b7732ad0466f0749b49300 (diff)
downloadgcc-d0ce8e4c9772b478f7ce3088a46c5824c9c83c5a.zip
gcc-d0ce8e4c9772b478f7ce3088a46c5824c9c83c5a.tar.gz
gcc-d0ce8e4c9772b478f7ce3088a46c5824c9c83c5a.tar.bz2
tree-ssa.c (walk_use_def_chains_1): Make the visited map a pointer set instead of a bitmap.
* tree-ssa.c (walk_use_def_chains_1): Make the visited map a pointer set instead of a bitmap. (walk_use_def_chains): Create, pass and clean up that pointer_set. * tree-ssa-alias.c (struct alias_info): Make the ssa_names_visited field an sbitmap. (init_alias_info): Allocate and zero it here. (delete_alias_info): Delete it here. (collect_points_to_info_for): Use it. From-SVN: r90508
Diffstat (limited to 'gcc/tree-ssa-alias.c')
-rw-r--r--gcc/tree-ssa-alias.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c
index 8e42427..2da76ce 100644
--- a/gcc/tree-ssa-alias.c
+++ b/gcc/tree-ssa-alias.c
@@ -73,7 +73,7 @@ struct alias_info
/* SSA names visited while collecting points-to information. If bit I
is set, it means that SSA variable with version I has already been
visited. */
- bitmap ssa_names_visited;
+ sbitmap ssa_names_visited;
/* Array of SSA_NAME pointers processed by the points-to collector. */
varray_type processed_ptrs;
@@ -368,7 +368,8 @@ init_alias_info (void)
static bool aliases_computed_p = false;
ai = xcalloc (1, sizeof (struct alias_info));
- ai->ssa_names_visited = BITMAP_XMALLOC ();
+ ai->ssa_names_visited = sbitmap_alloc (num_ssa_names);
+ sbitmap_zero (ai->ssa_names_visited);
VARRAY_TREE_INIT (ai->processed_ptrs, 50, "processed_ptrs");
ai->addresses_needed = BITMAP_XMALLOC ();
VARRAY_UINT_INIT (ai->num_references, num_referenced_vars, "num_references");
@@ -449,7 +450,7 @@ delete_alias_info (struct alias_info *ai)
{
size_t i;
- BITMAP_XFREE (ai->ssa_names_visited);
+ sbitmap_free (ai->ssa_names_visited);
ai->processed_ptrs = NULL;
BITMAP_XFREE (ai->addresses_needed);
@@ -484,9 +485,9 @@ collect_points_to_info_for (struct alias_info *ai, tree ptr)
{
gcc_assert (POINTER_TYPE_P (TREE_TYPE (ptr)));
- if (!bitmap_bit_p (ai->ssa_names_visited, SSA_NAME_VERSION (ptr)))
+ if (!TEST_BIT (ai->ssa_names_visited, SSA_NAME_VERSION (ptr)))
{
- bitmap_set_bit (ai->ssa_names_visited, SSA_NAME_VERSION (ptr));
+ SET_BIT (ai->ssa_names_visited, SSA_NAME_VERSION (ptr));
walk_use_def_chains (ptr, collect_points_to_info_r, ai, true);
VARRAY_PUSH_TREE (ai->processed_ptrs, ptr);
}