This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] improve C++ code by changing fold-const.c
- From: Roger Sayle <roger at eyesopen dot com>
- To: law at redhat dot com
- Cc: Andrew Pinski <pinskia at physics dot uc dot edu>, <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 17 May 2004 22:38:31 -0600 (MDT)
- Subject: Re: [PATCH] improve C++ code by changing fold-const.c
On Mon, 17 May 2004 email@example.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
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++.