summaryrefslogtreecommitdiff
path: root/gcc/tree-vn.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2008-04-15 13:28:08 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2008-04-15 13:28:08 +0000
commitfb05ee8785f73de2d7d97547ac9a9bd19fc0463e (patch)
tree9098d5ac54a9f0a83f6c1809c9d7cb33b7f481de /gcc/tree-vn.c
parentdc543af159c1eeb5ca6fa36d88639f1b2010475a (diff)
downloadgcc-fb05ee8785f73de2d7d97547ac9a9bd19fc0463e.tar.gz
2008-04-15 Richard Guenther <rguenther@suse.de>
* tree-ssa-sccvn.h (vn_reference_lookup): Adjust prototype. * tree-ssa-sccvn.c (vn_reference_lookup): New parameter maywalk. (visit_reference_op_load): Do walk vuse-vdef chains on vn_reference_lookup. (visit_reference_op_store): But do not here. * tree-vn.c (vn_lookup): Do not walk vuse-vdef chains on vn_reference_lookup. (vn_lookup_with_vuses): But do so here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@134314 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vn.c')
-rw-r--r--gcc/tree-vn.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/tree-vn.c b/gcc/tree-vn.c
index 2122a7e432e..c09dfb76284 100644
--- a/gcc/tree-vn.c
+++ b/gcc/tree-vn.c
@@ -255,7 +255,7 @@ vn_lookup (tree expr)
/* In the case of array-refs of constants, for example, we can
end up with no vuses. */
case tcc_reference:
- return vn_reference_lookup (expr, NULL);
+ return vn_reference_lookup (expr, NULL, false);
break;
/* It is possible to have CALL_EXPR with no vuses for things
like "cos", and these will fall into vn_lookup. */
@@ -264,7 +264,7 @@ vn_lookup (tree expr)
case tcc_expression:
case tcc_declaration:
if (TREE_CODE (expr) == CALL_EXPR || DECL_P (expr))
- return vn_reference_lookup (expr, NULL);
+ return vn_reference_lookup (expr, NULL, false);
else if (TREE_CODE (expr) == SSA_NAME)
return SSA_NAME_VALUE (expr);
else if (TREE_CODE (expr) == ADDR_EXPR)
@@ -308,7 +308,7 @@ vn_lookup_with_vuses (tree expr, VEC (tree, gc) *vuses)
if (is_gimple_min_invariant (expr) || TREE_CODE (expr) == FIELD_DECL)
return expr;
- return vn_reference_lookup (expr, vuses);
+ return vn_reference_lookup (expr, vuses, true);
}
static tree