summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-sccvn.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2008-05-15 10:36:18 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2008-05-15 10:36:18 +0000
commit43a3cf9061a713f3b090a6a49ec246e2a0c2796a (patch)
tree6f8f7c379acc79115ebd45556e001eace5589796 /gcc/tree-ssa-sccvn.c
parentd3d9aac1e1c6938ad58c08915bb28dbc6389a0d3 (diff)
downloadgcc-43a3cf9061a713f3b090a6a49ec246e2a0c2796a.tar.gz
2008-05-15 Richard Guenther <rguenther@suse.de>
* tree-dfa.c (refs_may_alias_p): Allow all kinds of INDIRECT_REF and TARGET_MEM_REF. * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Handle TARGET_MEM_REF. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@135332 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-sccvn.c')
-rw-r--r--gcc/tree-ssa-sccvn.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c
index f5ec0a737b4..e8eb437d3e6 100644
--- a/gcc/tree-ssa-sccvn.c
+++ b/gcc/tree-ssa-sccvn.c
@@ -504,6 +504,27 @@ copy_reference_ops_from_ref (tree ref, VEC(vn_reference_op_s, heap) **result)
return;
}
+ if (TREE_CODE (ref) == TARGET_MEM_REF)
+ {
+ vn_reference_op_s temp;
+
+ memset (&temp, 0, sizeof (temp));
+ /* We do not care for spurious type qualifications. */
+ temp.type = TYPE_MAIN_VARIANT (TREE_TYPE (ref));
+ temp.opcode = TREE_CODE (ref);
+ temp.op0 = TMR_SYMBOL (ref) ? TMR_SYMBOL (ref) : TMR_BASE (ref);
+ temp.op1 = TMR_INDEX (ref);
+ VEC_safe_push (vn_reference_op_s, heap, *result, &temp);
+
+ memset (&temp, 0, sizeof (temp));
+ temp.type = NULL_TREE;
+ temp.opcode = TREE_CODE (ref);
+ temp.op0 = TMR_STEP (ref);
+ temp.op1 = TMR_OFFSET (ref);
+ VEC_safe_push (vn_reference_op_s, heap, *result, &temp);
+ return;
+ }
+
/* For non-calls, store the information that makes up the address. */
while (ref)