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: [PATCH] improve C++ code by changing fold-const.c



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


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