This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Check precision in STRIP_NOPS when possible (take 2)
Richard Guenther writes:
> On Thu, Jun 11, 2009 at 3:37 AM, Adam Nemet<anemet@caviumnetworks.com> wrote:
> > + ?/* C++ casts a void_zero_node to a pointer type for the dummy
> > + ? ? object. ?*/
> > + ?if (inner_type == void_type_node)
> > + ? ?return false;
>
> what's all this about? The mode check will deal with it properly.
Both here and:
> > + ?/* Aggregate types have no precision so we fall back on the machine
> > + ? ? mode. ?The C++ front-end creates NOP_EXPR of aggregate types for
> > + ? ? example for reinterpret_cast. ?*/
> > + ?else if (AGGREGATE_TYPE_P (outer_type))
> > + ? ?return TYPE_MODE (outer_type) == TYPE_MODE (inner_type);
> > + ?else
> > + ? ?gcc_unreachable ();
>
> no if's necessary, just fall back to mode comparisions.
here I chose to spell these out so that we see the explicit cases that are
handled with TYPE_MODE instead just: everything else, use TYPE_MODE. But I
guess you don't like that so I'll make the changes you request and resubmit.
Adam