re PR tree-optimization/91091 ([missed optimization] Missing optimization in unaliase...
authorRichard Biener <rguenther@suse.de>
Fri, 5 Jul 2019 12:50:45 +0000 (12:50 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 5 Jul 2019 12:50:45 +0000 (12:50 +0000)
commitfb4697e30bd0cd4bda66932e21c183273a5d1e63
tree392c65691fc7f7d8fd6d1dce0b8283095de689d5
parent75fad0a98919da8212be4efc479d098499f4f1c3
re PR tree-optimization/91091 ([missed optimization] Missing optimization in unaliased pointers)

2019-07-05  Richard Biener  <rguenther@suse.de>

PR tree-optimization/91091
* tree-ssa-alias.h (get_continuation_for_phi): Add tbaa_p parameter.
(walk_non_aliased_vuses): Likewise.
* tree-ssa-alias.c (maybe_skip_until): Pass down tbaa_p.
(get_continuation_for_phi): New tbaa_p parameter and pass
it down.
(walk_non_aliased_vuses): Likewise.
* ipa-prop.c (determine_known_aggregate_parts): Adjust.
* tree-ssa-pre.c (translate_vuse_through_block): Likewise.
* tree-ssa-scopedtables.c (avail_exprs_stack::lookup_avail_expr):
Likewise.
* tree-ssa-sccvn.c (struct vn_walk_cb_data): Add tbaa_p flag.
(adjust_offsets_for_equal_base_address): New function.
(vn_reference_lookup_3): Use it to catch more base equivalences.
Handle and pass down tbaa_p flag.
(vn_reference_lookup_pieces): Adjust.
(vn_reference_lookup): Remove alias-set altering, instead pass
down false as tbaa_p.

* gcc.dg/tree-ssa/pr91091-2.c: New testcase.
* gcc.dg/tree-ssa/ssa-fre-70.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-71.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-72.c: Likewise.

From-SVN: r273135
12 files changed:
gcc/ChangeLog
gcc/ipa-prop.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/pr91091-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-70.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-71.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-72.c [new file with mode: 0644]
gcc/tree-ssa-alias.c
gcc/tree-ssa-alias.h
gcc/tree-ssa-pre.c
gcc/tree-ssa-sccvn.c
gcc/tree-ssa-scopedtables.c