diff options
author | Jeff Law <law@redhat.com> | 2004-11-24 20:54:07 -0700 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2004-11-24 20:54:07 -0700 |
commit | 0bab1c88870a0e2767441248d20524e2ccf3c137 (patch) | |
tree | 8d62af56929c7590354027e41a57f23ab06ccd38 /gcc | |
parent | 367390404d26b7bfc400d77893579e83e2a19fb9 (diff) | |
download | gcc-0bab1c88870a0e2767441248d20524e2ccf3c137.zip gcc-0bab1c88870a0e2767441248d20524e2ccf3c137.tar.gz gcc-0bab1c88870a0e2767441248d20524e2ccf3c137.tar.bz2 |
tree-ssa-alias.c (compute_flow_insensitive_aliasing): Reduce the number of queries to random elements in the ai->written_vars bitmap.
* tree-ssa-alias.c (compute_flow_insensitive_aliasing): Reduce
the number of queries to random elements in the ai->written_vars
bitmap.
From-SVN: r91271
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/tree-ssa-alias.c | 15 |
2 files changed, 16 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7aad684..94ada81 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2004-11-24 Jeff Law <law@redhat.com> + + * tree-ssa-alias.c (compute_flow_insensitive_aliasing): Reduce + the number of queries to random elements in the ai->written_vars + bitmap. + 2004-11-24 Roger Sayle <roger@eyesopen.com> * config/i386/i386.c (override_options): Disable x87 fancy math diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c index 0e30f12..4640f1f 100644 --- a/gcc/tree-ssa-alias.c +++ b/gcc/tree-ssa-alias.c @@ -921,11 +921,16 @@ compute_flow_insensitive_aliasing (struct alias_info *ai) /* Skip memory tags and variables that have never been written to. We also need to check if the variables are call-clobbered because they may be overwritten by - function calls. */ - tag_stored_p = bitmap_bit_p (ai->written_vars, tag_ann->uid) - || is_call_clobbered (tag); - var_stored_p = bitmap_bit_p (ai->written_vars, v_ann->uid) - || is_call_clobbered (var); + function calls. + + Note this is effectively random accessing elements in + the sparse bitset, which can be highly inefficient. + So we first check the call_clobbered status of the + tag and variable before querying the bitmap. */ + tag_stored_p = is_call_clobbered (tag) + || bitmap_bit_p (ai->written_vars, tag_ann->uid); + var_stored_p = is_call_clobbered (var) + || bitmap_bit_p (ai->written_vars, v_ann->uid); if (!tag_stored_p && !var_stored_p) continue; |