re PR fortran/67170 (PRE can't hoist out a readonly argument)
authorRichard Biener <rguenther@suse.de>
Tue, 29 Sep 2015 13:04:18 +0000 (13:04 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 29 Sep 2015 13:04:18 +0000 (13:04 +0000)
commite7cbc0960edec3d2ce1edf00b6c536a6f2faca33
tree5013d6531f4e348668278ebcc16763017f224884
parenteada851cc9fb2822989d3ef81bb5b4b08dcc81a7
re PR fortran/67170 (PRE can't hoist out a readonly argument)

2015-09-29  Richard Biener  <rguenther@suse.de>

PR tree-optimization/67170
* tree-ssa-alias.h (get_continuation_for_phi): Adjust
the translate function pointer parameter to get the
bool whether to disambiguate only by reference.
(walk_non_aliased_vuses): Likewise.
* tree-ssa-alias.c (maybe_skip_until): Adjust.
(get_continuation_for_phi_1): Likewise.
(get_continuation_for_phi): Likewise.
(walk_non_aliased_vuses): Likewise.
* tree-ssa-sccvn.c (const_parms): New bitmap.
(vn_reference_lookup_3): Adjust for interface change.
Disambiguate parameters pointing to readonly memory.
(free_scc_vn): Free const_parms.
(run_scc_vn): Initialize const_parms from a fn spec attribute.

* gfortran.dg/pr67170.f90: New testcase.

From-SVN: r228244
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/pr67170.f90 [new file with mode: 0644]
gcc/tree-ssa-alias.c
gcc/tree-ssa-alias.h
gcc/tree-ssa-sccvn.c