diff options
author | Jeff Law <law@redhat.com> | 2004-11-30 17:33:05 -0700 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2004-11-30 17:33:05 -0700 |
commit | 874437bca02e96899291027cfa3d6e4d4e08414f (patch) | |
tree | cd189cb08fa13a7f1b8b3f73f4d5e9b4b6f53621 /gcc/tree-ssa-alias.c | |
parent | 29b0a291d41c929c8b86f40da25071e09beeb7a6 (diff) | |
download | gcc-874437bca02e96899291027cfa3d6e4d4e08414f.zip gcc-874437bca02e96899291027cfa3d6e4d4e08414f.tar.gz gcc-874437bca02e96899291027cfa3d6e4d4e08414f.tar.bz2 |
sbitmap.c (sbitmap_any_common_bits): New function.
* sbitmap.c (sbitmap_any_common_bits): New function.
* sbitmap.h (sbitmap_any_common_bits): Prototype.
* modulo-sched.c (sms_schedule_by_order): Use sbitmap_any_common_bits
No longer allocate/free "psp", "pss" sbitmaps.
* tree-ssa-alias.c (compute_flow_insensitive_aliasing): Similarly for
the "res" sbitmap.
(group_aliases): Similarly.
From-SVN: r91550
Diffstat (limited to 'gcc/tree-ssa-alias.c')
-rw-r--r-- | gcc/tree-ssa-alias.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c index 3fce93a..37ea0f2 100644 --- a/gcc/tree-ssa-alias.c +++ b/gcc/tree-ssa-alias.c @@ -927,7 +927,6 @@ static void compute_flow_insensitive_aliasing (struct alias_info *ai) { size_t i; - sbitmap res; /* Initialize counter for the total number of virtual operands that aliasing will introduce. When AI->TOTAL_ALIAS_VOPS goes beyond the @@ -1021,8 +1020,6 @@ compute_flow_insensitive_aliasing (struct alias_info *ai) To avoid this problem, we do a final traversal of AI->POINTERS looking for pairs of pointers that have no aliased symbols in common and yet have conflicting alias set numbers. */ - res = sbitmap_alloc (num_referenced_vars); - for (i = 0; i < ai->num_pointers; i++) { size_t j; @@ -1042,8 +1039,7 @@ compute_flow_insensitive_aliasing (struct alias_info *ai) /* The two pointers may alias each other. If they already have symbols in common, do nothing. */ - sbitmap_a_and_b (res, may_aliases1, may_aliases2); - if (sbitmap_first_set_bit (res) >= 0) + if (sbitmap_any_common_bits (may_aliases1, may_aliases2)) continue; if (sbitmap_first_set_bit (may_aliases2) >= 0) @@ -1065,8 +1061,6 @@ compute_flow_insensitive_aliasing (struct alias_info *ai) } } - sbitmap_free (res); - if (dump_file) fprintf (dump_file, "%s: Total number of aliased vops: %ld\n", get_name (current_function_decl), @@ -1209,15 +1203,12 @@ static void group_aliases (struct alias_info *ai) { size_t i; - sbitmap res; /* Sort the POINTERS array in descending order of contributed virtual operands. */ qsort (ai->pointers, ai->num_pointers, sizeof (struct alias_map_d *), total_alias_vops_cmp); - res = sbitmap_alloc (num_referenced_vars); - /* For every pointer in AI->POINTERS, reverse the roles of its tag and the tag's may-aliases set. */ for (i = 0; i < ai->num_pointers; i++) @@ -1237,8 +1228,7 @@ group_aliases (struct alias_info *ai) { sbitmap tag2_aliases = ai->pointers[j]->may_aliases; - sbitmap_a_and_b (res, tag1_aliases, tag2_aliases); - if (sbitmap_first_set_bit (res) >= 0) + if (sbitmap_any_common_bits (tag1_aliases, tag2_aliases)) { tree tag2 = var_ann (ai->pointers[j]->var)->type_mem_tag; @@ -1308,8 +1298,6 @@ group_aliases (struct alias_info *ai) } } - sbitmap_free (res); - if (dump_file) fprintf (dump_file, "%s: Total number of aliased vops after grouping: %ld%s\n", |