This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Do not compare types in operands_equal_p if OEP_ADDRESS_OF is set
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: gcc-patches at gcc dot gnu dot org, rguenther at suse dot de, law at redhat dot com
- Date: Tue, 06 Oct 2015 10:58:45 +0200
- Subject: Re: Do not compare types in operands_equal_p if OEP_ADDRESS_OF is set
- Authentication-results: sourceware.org; auth=none
- References: <20151005230254 dot GA43326 at kam dot mff dot cuni dot cz>
> I also disabled type matching done by operand_equal_p and cleaned up the
> conditional of MEM_REF into multiple ones - for example it was passing
> OEP_ADDRESS_OF when comparing TYPE_SIZE which is quite a nonsense.
>
> I wonder what to do about OPE_CONSTANT_ADDRESS_OF. This flag does not seem
> to be used at all in current tree nor documented somehow.
It is used and (un-)documented as OEP_ADDRESS_OF, see the ADDR_EXPR case:
case ADDR_EXPR:
return operand_equal_p (TREE_OPERAND (arg0, 0), TREE_OPERAND (arg1, 0),
TREE_CONSTANT (arg0) && TREE_CONSTANT (arg1)
? OEP_CONSTANT_ADDRESS_OF | OEP_ADDRESS_OF : 0);
So it's OEP_ADDRESS_OF but for constant addresses.
--
Eric Botcazou