diff options
author | Daniel Berlin <dberlin@dberlin.org> | 2006-12-05 23:46:28 +0000 |
---|---|---|
committer | Daniel Berlin <dberlin@gcc.gnu.org> | 2006-12-05 23:46:28 +0000 |
commit | ff3add8dceb6734ea09b8bddfd1ecef920b44897 (patch) | |
tree | cc05dbd9f50426b87dadb3a77e4a6aba339b4913 | |
parent | 143c27b06512ff77ee978d8c6d4aa88103b70f1e (diff) | |
download | gcc-ff3add8dceb6734ea09b8bddfd1ecef920b44897.zip gcc-ff3add8dceb6734ea09b8bddfd1ecef920b44897.tar.gz gcc-ff3add8dceb6734ea09b8bddfd1ecef920b44897.tar.bz2 |
tree-ssa-structalias.c (set_used_smts): Re-fix pr29156.
2006-12-05 Daniel Berlin <dberlin@dberlin.org>
* tree-ssa-structalias.c (set_used_smts): Re-fix pr29156.
Optimize to avoid marking more SMT's as used when they aren't.
From-SVN: r119562
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/tree-ssa-structalias.c | 25 |
2 files changed, 16 insertions, 14 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3f098bf..cba8137 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2006-12-05 Daniel Berlin <dberlin@dberlin.org> + + * tree-ssa-structalias.c (set_used_smts): Re-fix pr29156. + Optimize to avoid marking more SMT's as used when they aren't. + 2006-12-05 Eric Christopher <echristo@apple.com> * config/i386/i386.c (x86_output_aligned_bss): Move out diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index 99deb41..6bd5d6f 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -3894,15 +3894,21 @@ set_used_smts (void) unsigned int j; var_ann_t va; struct ptr_info_def *pi = NULL; - - if (TREE_CODE (vi->decl) == SSA_NAME) + + /* For parm decls, the pointer info may be under the default + def. */ + if (TREE_CODE (vi->decl) == PARM_DECL + && gimple_default_def (cfun, var)) + pi = SSA_NAME_PTR_INFO (gimple_default_def (cfun, var)); + else if (TREE_CODE (var) == SSA_NAME) pi = SSA_NAME_PTR_INFO (var); /* Skip the special variables and those without their own solution set. */ if (vi->is_special_var || vi->node != vi->id || !SSA_VAR_P (var) || (pi && !pi->is_dereferenced) - || (DECL_P (var) && !may_be_aliased (var))) + || (TREE_CODE (var) == VAR_DECL && !may_be_aliased (var)) + || !POINTER_TYPE_P (TREE_TYPE (var))) continue; if (TREE_CODE (var) == SSA_NAME) @@ -3913,17 +3919,8 @@ set_used_smts (void) continue; smt = va->symbol_mem_tag; - if (smt) - { - EXECUTE_IF_SET_IN_BITMAP (vi->solution, 0, j, bi) - { - if (get_varinfo (j)->is_artificial_var) - { - bitmap_set_bit (used_smts, DECL_UID (smt)); - break; - } - } - } + if (smt && bitmap_bit_p (vi->solution, anything_id)) + bitmap_set_bit (used_smts, DECL_UID (smt)); } } |