diff options
author | Richard Guenther <rguenther@suse.de> | 2007-11-09 14:01:33 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2007-11-09 14:01:33 +0000 |
commit | 76e910c6b72b46e017d7be9a6494113ebae72f85 (patch) | |
tree | d8b32d4da8ab288343c7d289a01fb22089dced27 /gcc/tree-ssa-alias.c | |
parent | de266950570fd88e4e205bfb87bcbd7ba89b5c27 (diff) | |
download | gcc-76e910c6b72b46e017d7be9a6494113ebae72f85.zip gcc-76e910c6b72b46e017d7be9a6494113ebae72f85.tar.gz gcc-76e910c6b72b46e017d7be9a6494113ebae72f85.tar.bz2 |
bitmap.h (bitmap_single_bit_set_p): Declare.
2007-11-09 Richard Guenther <rguenther@suse.de>
* bitmap.h (bitmap_single_bit_set_p): Declare.
* bitmap.c (bitmap_single_bit_set_p): New function.
* tree-ssa-alias.c (add_may_alias_for_new_tag): Use it.
(maybe_create_global_var): Use bitmap_empty_p.
From-SVN: r130045
Diffstat (limited to 'gcc/tree-ssa-alias.c')
-rw-r--r-- | gcc/tree-ssa-alias.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c index dc40c2e..f2e3064 100644 --- a/gcc/tree-ssa-alias.c +++ b/gcc/tree-ssa-alias.c @@ -2780,7 +2780,7 @@ maybe_create_global_var (void) So, if we have some pure/const and some regular calls in the program we create .GLOBAL_VAR to avoid missing these relations. */ - if (bitmap_count_bits (gimple_call_clobbered_vars (cfun)) == 0 + if (bitmap_empty_p (gimple_call_clobbered_vars (cfun)) && stats->num_call_sites > 0 && stats->num_pure_const_call_sites > 0 && stats->num_call_sites > stats->num_pure_const_call_sites) @@ -3544,7 +3544,8 @@ add_may_alias_for_new_tag (tree tag, tree var) aliases = may_aliases (var); /* Case 1: |aliases| == 1 */ - if (aliases && bitmap_count_bits (aliases) == 1) + if (aliases + && bitmap_single_bit_set_p (aliases)) { tree ali = referenced_var (bitmap_first_set_bit (aliases)); if (TREE_CODE (ali) == SYMBOL_MEMORY_TAG) |