+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.
+
2008-05-15 Uros Bizjak <ubizjak@gmail.com>
H.J. Lu <hongjiu.lu@intel.com>
gcc_assert ((SSA_VAR_P (ref1)
|| handled_component_p (ref1)
- || TREE_CODE (ref1) == INDIRECT_REF)
+ || INDIRECT_REF_P (ref1)
+ || TREE_CODE (ref1) == TARGET_MEM_REF)
&& (SSA_VAR_P (ref2)
|| handled_component_p (ref2)
- || TREE_CODE (ref2) == INDIRECT_REF));
+ || INDIRECT_REF_P (ref2)
+ || TREE_CODE (ref2) == TARGET_MEM_REF));
/* Defer to TBAA if possible. */
if (flag_strict_aliasing
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)