/* Generic routines for manipulating SSA_NAME expressions
- Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GCC.
varray_type ssa_names;
/* Bitmap of ssa names marked for rewriting. */
-bitmap ssa_names_to_rewrite;
+static bitmap ssa_names_to_rewrite;
/* Free list of SSA_NAMEs. This list is wiped at the end of each function
after we leave SSA form. */
bool
marked_for_rewrite_p (tree var)
{
- if (ssa_names_to_rewrite
- && bitmap_bit_p (ssa_names_to_rewrite, SSA_NAME_VERSION (var)))
- return true;
-
- return false;
+ return bitmap_bit_p (ssa_names_to_rewrite, SSA_NAME_VERSION (var));
}
/* Returns true if any ssa name is marked for rewrite. */
if (!ssa_names_to_rewrite)
return false;
- return bitmap_first_set_bit (ssa_names_to_rewrite) != -1;
+ return !bitmap_empty_p (ssa_names_to_rewrite);
}
/* Mark ssa name VAR for rewriting. */
void
mark_for_rewrite (tree var)
{
- if (!ssa_names_to_rewrite)
- ssa_names_to_rewrite = BITMAP_XMALLOC ();
-
bitmap_set_bit (ssa_names_to_rewrite, SSA_NAME_VERSION (var));
}
void
unmark_all_for_rewrite (void)
{
- if (!ssa_names_to_rewrite)
- return;
-
bitmap_clear (ssa_names_to_rewrite);
}
bitmap
marked_ssa_names (void)
{
- bitmap ret = BITMAP_XMALLOC ();
- if (ssa_names_to_rewrite)
- bitmap_copy (ret, ssa_names_to_rewrite);
+ bitmap ret = BITMAP_ALLOC (NULL);
+
+ bitmap_copy (ret, ssa_names_to_rewrite);
return ret;
}
large. */
VARRAY_PUSH_TREE (ssa_names, NULL_TREE);
free_ssanames = NULL;
+ ssa_names_to_rewrite = BITMAP_ALLOC (NULL);
}
/* Finalize management of SSA_NAMEs. */
void
fini_ssanames (void)
{
+ BITMAP_FREE (ssa_names_to_rewrite);
ggc_free (ssa_names);
ssa_names = NULL;
free_ssanames = NULL;