aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-sccvn.h
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2022-05-12 12:13:29 +0200
committerRichard Biener <rguenther@suse.de>2022-05-12 13:27:12 +0200
commit94b8a37fa16f7638cc1965718f4ec71719506743 (patch)
tree2c4655d41dda9a3ca708025e0cd240b3ea7b7739 /gcc/tree-ssa-sccvn.h
parent78c8b0b980341f28de96da518a38bf85bbd24d98 (diff)
downloadgcc-94b8a37fa16f7638cc1965718f4ec71719506743.zip
gcc-94b8a37fa16f7638cc1965718f4ec71719506743.tar.gz
gcc-94b8a37fa16f7638cc1965718f4ec71719506743.tar.bz2
tree-optimization/105562 - avoid uninit diagnostic with better FRE
We can avoid some uninit diagnostics by making FRE disambiguate against CLOBBERs since any aliasing there would invoke undefined behavior for a read we are looking up. 2022-05-12 Richard Biener <rguenther@suse.de> PR tree-optimization/105562 * tree-ssa-sccvn.cc (vn_reference_lookup_3): Disambiguate against all CLOBBER defs if there's not an obvious must-alias and we are not doing redundant store elimination. (vn_walk_cb_data::redundant_store_removal_p): New field. (vn_reference_lookup_pieces): Initialize it. (vn_reference_lookup): Add argument to specify if we are doing redundant store removal. (eliminate_dom_walker::eliminate_stmt): Specify we do. * tree-ssa-sccvn.h (vn_reference_lookup): Adjust. * g++.dg/warn/uninit-pr105562.C: New testcase.
Diffstat (limited to 'gcc/tree-ssa-sccvn.h')
-rw-r--r--gcc/tree-ssa-sccvn.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/tree-ssa-sccvn.h b/gcc/tree-ssa-sccvn.h
index c4e3410..a1b1e6b 100644
--- a/gcc/tree-ssa-sccvn.h
+++ b/gcc/tree-ssa-sccvn.h
@@ -265,7 +265,7 @@ tree vn_reference_lookup_pieces (tree, alias_set_type, alias_set_type, tree,
vec<vn_reference_op_s> ,
vn_reference_t *, vn_lookup_kind);
tree vn_reference_lookup (tree, tree, vn_lookup_kind, vn_reference_t *, bool,
- tree * = NULL, tree = NULL_TREE);
+ tree * = NULL, tree = NULL_TREE, bool = false);
void vn_reference_lookup_call (gcall *, vn_reference_t *, vn_reference_t);
vn_reference_t vn_reference_insert_pieces (tree, alias_set_type, alias_set_type,
tree, vec<vn_reference_op_s>,