This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [tree-ssa] must-alias fixes...


On Fri, Nov 21, 2003 at 03:11:08PM +0100, Jan Hubicka wrote:
> I also don't get the:
>   /* FIXME lose the STRIP_NOPS once we are more clever about builtins.  */
>   STRIP_NOPS (tmp);
>   if (TREE_CODE (tmp) == ADDR_EXPR
>       && TREE_CODE (TREE_OPERAND (tmp, 0)) == STRING_CST)
>      return true;
> why we do allow ADDR_EXPRs of STRING_CST to be nopped and other
> ADDR_EXPRs not?  This is how NOP_EXPRs can leak into PLUS_EXPR the
> current implementation.

Ah hah.  I wonder if we can do something kinky here and instead allow
this to be one case where ADDR_EXPR changes types slightly, and in a
controlled way (char to const char or such).  That would be a better
hack than this, I think.

Of course, these casts might also be declared unnecessary now, after
I fixed a case of missing TYPE_MAIN_VARIANT there.  Which might be
the best sort of fix.

> It seems to me that we should allow nopped ADDR_EXPRs in general and also
> nopped PLUS_EXPR with ADDR_EXPR and INTEGER_CST operands, shouldn't we?

No, because then we can't fold them into more natural constructs.


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]