This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PTA with lots of SFTs
Richard Guenther wrote:
>
> 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.
>
>
.
.
.
> {
> + subvar_t sv;
> if (var_can_have_subvars (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.
> ! 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);
> ! 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)
>
As of r130470 when configured like this (on x86_64-unknown-linux-gnu):
$ ../clean/configure --prefix=/usr/local/test --enable-languages=c
--disable-checking
Results in (in stage 2):
/home/daney/gccsvn/native-clean/./prev-gcc/xgcc
-B/home/daney/gccsvn/native-clean/./prev-gcc/
-B/usr/local/test/x86_64-unknown-linux-gnu/bin/ -c -g -O2 -DIN_GCC -W
-Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition -Wmissing-format-attribute -pedantic
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror
-DHAVE_CONFIG_H -I. -I. -I../../clean/gcc -I../../clean/gcc/.
-I../../clean/gcc/../include -I../../clean/gcc/../libcpp/include
-I../../clean/gcc/../libdecnumber -I../../clean/gcc/../libdecnumber/bid
-I../libdecnumber ../../clean/gcc/tree-ssa-structalias.c -o
tree-ssa-structalias.o
cc1: warnings being treated as errors
../../clean/gcc/tree-ssa-structalias.c: In function ‘find_what_p_points_to’:
../../clean/gcc/tree-ssa-structalias.c:4764: error: ‘j’ may be used
uninitialized in this function
../../clean/gcc/tree-ssa-structalias.c:4764: note: ‘j’ was declared here
make[3]: *** [tree-ssa-structalias.o] Error 1