Use OEP_MATCH_SIDE_EFFECTS in compare_ao_refs

* tree-ssa-alias.c (ao_compare::compare_ao_refs,
	ao_compare::hash_ao_ref): Use OEP_MATCH_SIDE_EFFECTS.
This commit is contained in:
Jan Hubicka 2020-11-21 21:34:02 +01:00
parent caf17f3afa
commit ddaad23e2f

View File

@ -3985,11 +3985,12 @@ ao_compare::compare_ao_refs (ao_ref *ref1, ao_ref *ref2,
return SEMANTICS;
/* Now we can compare the address of actual memory access. */
if (!operand_equal_p (r1, r2, OEP_ADDRESS_OF))
if (!operand_equal_p (r1, r2, OEP_ADDRESS_OF | OEP_MATCH_SIDE_EFFECTS))
return SEMANTICS;
}
/* For constant accesses we get more matches by comparing offset only. */
else if (!operand_equal_p (base1, base2, OEP_ADDRESS_OF))
else if (!operand_equal_p (base1, base2,
OEP_ADDRESS_OF | OEP_MATCH_SIDE_EFFECTS))
return SEMANTICS;
/* We can't simply use get_object_alignment_1 on the full
@ -4197,11 +4198,11 @@ ao_compare::hash_ao_ref (ao_ref *ref, bool lto_streaming_safe, bool tbaa,
r = TREE_OPERAND (r, 0);
}
hash_operand (TYPE_SIZE (TREE_TYPE (ref->ref)), hstate, 0);
hash_operand (r, hstate, OEP_ADDRESS_OF);
hash_operand (r, hstate, OEP_ADDRESS_OF | OEP_MATCH_SIDE_EFFECTS);
}
else
{
hash_operand (tbase, hstate, OEP_ADDRESS_OF);
hash_operand (tbase, hstate, OEP_ADDRESS_OF | OEP_MATCH_SIDE_EFFECTS);
hstate.add_poly_int (ref->offset);
hstate.add_poly_int (ref->size);
hstate.add_poly_int (ref->max_size);