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 Mon, 17 May 2004 law@redhat.com wrote:
> >Could you explain a bit more about why this is needed?
> >Which parts of tree-ssa have problems with "NOP_EXPR (type, ADDR_EXPR
> >...)" that they don't have with just ADDR_EXPR and a mismatched type?
>
> Copy propagation and scalar replacement are both significantly hindered
> by the presence of NOP_EXPRs.  Alias analysis is probably hindered as
> well.

Forgive me if I appear to be asking stupid questions, but after years
of finding my way around constant folding and RTL optimizations, I
find myself almost back to zero again with tree-ssa.  Could you provide
a simple example or two from copy propagation/scalar replacement so I
can get a better handle on what the issues (design decisions) are?


My questions aren't objections to Andrew's patch, so please feel free
to approve his solution if you think it really is the correct fix.
I've nothing against ADDR_EXPR becoming a form of conversion operator,
I'm just trying to understand the motivation, i.e. why it helps C++.

Roger
--


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