[PATCH] New predicate covering NOP_EXPR and CONVERT_EXPR
Richard Guenther
rguenther@suse.de
Fri Dec 2 17:57:00 GMT 2005
On Fri, 2 Dec 2005, Joseph S. Myers wrote:
> On Fri, 2 Dec 2005, Giovanni Bajo wrote:
>
> > Given that, in tree-ssa times, *most* of the compiler does not know the
> > difference between NOP_EXPR and CONVERT_EXPR and the exact semantics are
> > gone, I think such an audit will be a waste of time, and in practice nobody
> > will ever do it and we'll have to live with those duplicate trees for more
> > time.
>
> I don't believe that "most". There are lots of distinctions, some
> intentional and some not.
>
> It's simply a matter of due diligence to read and understand the code you
> are changing (directly or by implication by changing the semantics of
> internal representation - in which I include clarifying unclear
> semantics).
>
> Every piece of code referencing NOP_EXPR and CONVERT_EXPR together needs
> to change anyway to reference just one; I don't see a problem with
> changing such pieces of code twice. This is a purely mechanical change or
> pair of changes in any case.
I'll try to get the number of these required changes down by using
fold_convert where appropriate in various places. Inside fold
we treat those two as identical and where we don't it's a bug and
possibly causes missed optimizations.
Frontends using them internally are possibly a problem, the middle-end
really doesn't care.
Richard.
k
More information about the Java-patches
mailing list