diff options
author | Richard Guenther <rguenther@suse.de> | 2011-01-21 14:02:41 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2011-01-21 14:02:41 +0000 |
commit | 3bc27de7f15eb376eaff150d5f5f663bb06426d4 (patch) | |
tree | bb89c6b2d21b401a229d25af78bc12f6947a86fa /gcc/tree-ssa-sccvn.h | |
parent | 33e39b66855b799d048a88a6a7eaef6d2225c21f (diff) | |
download | gcc-3bc27de7f15eb376eaff150d5f5f663bb06426d4.zip gcc-3bc27de7f15eb376eaff150d5f5f663bb06426d4.tar.gz gcc-3bc27de7f15eb376eaff150d5f5f663bb06426d4.tar.bz2 |
re PR tree-optimization/47365 (wrong code with -O -ftree-pre)
2011-01-21 Richard Guenther <rguenther@suse.de>
PR tree-optimization/47365
* tree-ssa-sccvn.h (vn_lookup_kind): Declare.
(vn_reference_lookup_pieces): Adjust.
(vn_reference_lookup): Likewise.
* tree-ssa-sccvn.c (vn_walk_kind): New static global.
(vn_reference_lookup_3): Only look through kills if in
VN_WALKREWRITE mode.
(vn_reference_lookup_pieces): Adjust.
(vn_reference_lookup): Likewise.
(visit_reference_op_load): Likewise.
(visit_reference_op_store): Likewise.
* tree-ssa-pre.c (phi_translate_1): Use VN_WALK mode.
(compute_avail): Likewise.
(eliminate): Likewise.
* gcc.dg/torture/pr47365.c: New testcase.
* gcc.dg/tree-ssa/pr47392.c: Likewise.
From-SVN: r169089
Diffstat (limited to 'gcc/tree-ssa-sccvn.h')
-rw-r--r-- | gcc/tree-ssa-sccvn.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/tree-ssa-sccvn.h b/gcc/tree-ssa-sccvn.h index bd8b9bc..3d9ee5f 100644 --- a/gcc/tree-ssa-sccvn.h +++ b/gcc/tree-ssa-sccvn.h @@ -187,10 +187,11 @@ void copy_reference_ops_from_ref (tree, VEC(vn_reference_op_s, heap) **); void copy_reference_ops_from_call (gimple, VEC(vn_reference_op_s, heap) **); bool ao_ref_init_from_vn_reference (ao_ref *, alias_set_type, tree, VEC (vn_reference_op_s, heap) *); +typedef enum { VN_NOWALK, VN_WALK, VN_WALKREWRITE } vn_lookup_kind; tree vn_reference_lookup_pieces (tree, alias_set_type, tree, VEC (vn_reference_op_s, heap) *, - vn_reference_t *, bool); -tree vn_reference_lookup (tree, tree, bool, vn_reference_t *); + vn_reference_t *, vn_lookup_kind); +tree vn_reference_lookup (tree, tree, vn_lookup_kind, vn_reference_t *); vn_reference_t vn_reference_insert (tree, tree, tree); vn_reference_t vn_reference_insert_pieces (tree, alias_set_type, tree, VEC (vn_reference_op_s, heap) *, |