This is the mail archive of the
mailing list for the GCC project.
Re: [patch] tree-ssa-ccp.c: Clean up ccp_fold.
- From: Roger Sayle <roger at eyesopen dot com>
- To: Kazu Hirata <kazu at cs dot umass dot edu>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 29 May 2005 10:19:14 -0600 (MDT)
- Subject: Re: [patch] tree-ssa-ccp.c: Clean up ccp_fold.
On Sun, 29 May 2005, Kazu Hirata wrote:
> 2005-05-29 Kazu Hirata <firstname.lastname@example.org>
> * tree-ssa-ccp.c (ccp_fold): Return immediately after calling
> fold_unary and fold_binary.
This is OK for mainline.
Whilst I acknowledge Richard Guenther's concerns that it would be
nice to assert/confirm that fold always returns with the same type
as its argument, such a check belongs in fold-const.c (much like
the current --enable-checking=fold code that verifies that the
input argument's tree is never modified. I think this is preferable
to potentially scattering a number of identical assertions at
each of fold's call sites.
I'll do some testing to see how close we now are to being completely
pointer equality type-safe.