This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix random hashing problems with ARRAY_REF and COMPONENT_REF
- From: Roger Sayle <roger at eyesopen dot com>
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 20 Jul 2004 20:04:57 -0600 (MDT)
- Subject: Re: Fix random hashing problems with ARRAY_REF and COMPONENT_REF
On Tue, 20 Jul 2004, Richard Kenner wrote:
> + ??? This is temporary and is meant only to handle the cases of the
> + optional operands for COMPONENT_REF and ARRAY_REF. */
> + if ((arg0 && !arg1) || (!arg0 && arg1))
> + return 0;
> + else if (!arg0 && !arg1)
> + return 1;
Wouldn't it be preferable to handle these cases in the recursive calls to
COMPONENT_REF and ARRAY_REF instead of slowing down the critical path for
every invocation of operand_equal_p?
If you do leave this code where it is, it's probably better written as:
if (!arg0 || !arg1)
return !arg0 && !arg1;
Roger
--