This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [PATCH] New predicate covering NOP_EXPR and CONVERT_EXPR
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Roger Sayle <roger at eyesopen dot com>
- Cc: Richard Guenther <rguenther at suse dot de>, gcc-patches at gcc dot gnu dot org, java-patches at gcc dot gnu dot org
- Date: Fri, 2 Dec 2005 14:35:38 +0000 (UTC)
- Subject: Re: [PATCH] New predicate covering NOP_EXPR and CONVERT_EXPR
- References: <Pine.LNX.4.44.0512012025120.4574-100000@www.eyesopen.com>
On Thu, 1 Dec 2005, Roger Sayle wrote:
> The only thing preventing this unification, at that time, was the
> Java front-end which inadvertantly distinguishes between CONVERT_EXPR
> and via parse.y:patch_cast. It turns out that in the Java front-end
I remain of the view, as I stated in
<http://gcc.gnu.org/ml/gcc-patches/2005-03/msg01326.html>, that an audit
of every use of NOP_EXPR and CONVERT_EXPR is needed to identify all places
where they are distinguished and replace them by a check of the real
property being distinguished. Are you saying that you did that audit (and
have a means to update it to current mainline without redoing it) and only
found that one place? If so, I think more details of it are needed, given
the comment I pointed out referring to "Proper functioning of many things
assumes ...".
I think NOP_CONVERSION_P (and something similar for case labels) is the
right way to go for an incremental conversion. That way we don't need to
rely on an audit not having missed any cases and not getting out of date,
instead each part of the audit is represented by a separately reviewed
patch adding uses of NOP_CONVERSION_P and, where appropriate, checks of
other conditions, and when the only references distinguishing NOP_EXPR
from CONVERT_EXPR are creations of those nodes rather than distinguishing
what's used by an existing tree node, they can be merged.
--
Joseph S. Myers http://www.srcf.ucam.org/~jsm28/gcc/
jsm@polyomino.org.uk (personal mail)
joseph@codesourcery.com (CodeSourcery mail)
jsm28@gcc.gnu.org (Bugzilla assignments and CCs)