This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] improve C++ code by changing fold-const.c
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: Roger Sayle <roger at eyesopen dot com>, law at redhat dot com, gcc-patches at gcc dot gnu dot org, Richard Henderson <rth at redhat dot com>, Andrew Pinski <pinskia at physics dot uc dot edu>
- Date: Fri, 21 May 2004 22:47:03 -0400
- Subject: Re: [PATCH] improve C++ code by changing fold-const.c
- References: <200405210300.i4L30AW5011486@speedy.slc.redhat.com> <40AEB4C1.6090804@codesourcery.com>
On May 21, 2004, at 22:02, Mark Mitchell wrote:
Strongly agree.
There are places in the front ends, at least that assume that the tree
structure is type correct, using explicit NOP_EXPRs to convert where
necessary. If the optimizers are confused by NOP_EXPRs, then they
should be fixed -- that should generally be an easy fix. (Note that a
NOP_EXPR is a promise that the underlying bits do not change.)
Maybe it is just me but the underlying types are the same as in the
second series
of patches I just check for equality instead of compatibly (which I
thought would
do the right thing any ways as the C++ front-end uses same_type_p which
calls comptypes
which is what the langhook does).
Oh by the way I notice that C++ front-end uses CONVERT_EXPR instead of
NOP_EXPR
when converting between pointer and reference types anyways which is
wrong as
CONVERT_EXPR is defined as creating code which this conversion does
not. There
are most likely more like this.
Just some more thoughts,
Andrew Pinski