Commit 9f59420d by Richard Guenther Committed by Richard Biener

tree-dfa.c (refs_may_alias_p): Allow all kinds of INDIRECT_REF and TARGET_MEM_REF.

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.

From-SVN: r135332
parent 6784c6e0
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> 2008-05-15 Uros Bizjak <ubizjak@gmail.com>
H.J. Lu <hongjiu.lu@intel.com> H.J. Lu <hongjiu.lu@intel.com>
......
...@@ -996,10 +996,12 @@ refs_may_alias_p (tree ref1, tree ref2) ...@@ -996,10 +996,12 @@ refs_may_alias_p (tree ref1, tree ref2)
gcc_assert ((SSA_VAR_P (ref1) gcc_assert ((SSA_VAR_P (ref1)
|| handled_component_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) && (SSA_VAR_P (ref2)
|| handled_component_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. */ /* Defer to TBAA if possible. */
if (flag_strict_aliasing if (flag_strict_aliasing
......
...@@ -504,6 +504,27 @@ copy_reference_ops_from_ref (tree ref, VEC(vn_reference_op_s, heap) **result) ...@@ -504,6 +504,27 @@ copy_reference_ops_from_ref (tree ref, VEC(vn_reference_op_s, heap) **result)
return; 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. */ /* For non-calls, store the information that makes up the address. */
while (ref) while (ref)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment