This is the mail archive of the
mailing list for the GCC project.
Re: [tree-ssa] CCP fixes
- From: Diego Novillo <dnovillo at redhat dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: 18 Feb 2003 21:47:42 -0500
- Subject: Re: [tree-ssa] CCP fixes
- References: <200302182005.h1IK5vQ5015542@localhost.redhat.com>
On Tue, 2003-02-18 at 15:05, firstname.lastname@example.org wrote:
> The second is more interesting. CCP was creating non-gimple trees.
Yes, we had this discussion last year. I initially had CCP not generate
non-gimple trees, but then I figured since the trees cause
really_constant_p() to return true, we should let it do the
replacement. What we really need is the builtin expanders to be smarter
(we currently fail string-opt-8.c for this reason).
I don't have a strong opinion wrt to this failure. But given the
choice, I would rather have CCP do the conversion and expand the GIMPLE
grammar to have is_simple_val() to use really_constant_p().
> While I haven't tried to construct a testcase where the compiler would
> fault, it seems *extremely* bad to me to allow CCP to change a tree
> from gimple form into non-gimple form.
All we need to do is accept in is_simple_val any tree that causes
really_constant_p() to return true. Things like &b - &a really are