diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-11-15 11:15:08 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-11-15 11:15:08 +0000 |
commit | babe10fa79e4cfa0e1e7e736a35aac6090e3c705 (patch) | |
tree | 5df9a1aee16895e76cfd432e23a15621197d36a8 /gcc/tree-ssa-structalias.c | |
parent | e66c4ec1e3deb257920a3027451fbf4e06430750 (diff) | |
download | gcc-babe10fa79e4cfa0e1e7e736a35aac6090e3c705.tar.gz |
2007-11-15 Richard Guenther <rguenther@suse.de>
* tree-ssa-alias.c (create_overlap_variables_for): Make sure
to only create SFTs if we also create variable infos for PTA.
* tree-ssa-structalias.c (set_uids_in_ptset): Add all overlapping
SFTs.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@130197 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
-rw-r--r-- | gcc/tree-ssa-structalias.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index 3820b1907cb..90c1d47f2ab 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -4749,15 +4749,24 @@ set_uids_in_ptset (tree ptr, bitmap into, bitmap from, bool is_derefed, || TREE_CODE (vi->decl) == PARM_DECL || TREE_CODE (vi->decl) == RESULT_DECL) { + subvar_t sv; if (var_can_have_subvars (vi->decl) - && get_subvars_for_var (vi->decl)) + && (sv = get_subvars_for_var (vi->decl))) { /* If VI->DECL is an aggregate for which we created - SFTs, add the SFT corresponding to VI->OFFSET. */ - tree sft = get_subvar_at (vi->decl, vi->offset); + SFTs, add the SFT corresponding to VI->OFFSET. + If we didn't do field-sensitive PTA we need to to + add all overlapping SFTs. */ + unsigned int j; + tree sft = get_first_overlapping_subvar (sv, vi->offset, + vi->size, &j); gcc_assert (sft); - if (sft) + for (; VEC_iterate (tree, sv, j, sft); ++j) { + if (SFT_OFFSET (sft) > vi->offset + && vi->size <= SFT_OFFSET (sft) - vi->offset) + break; + var_alias_set = get_alias_set (sft); if (no_tbaa_pruning || (!is_derefed && !vi->directly_dereferenced) |