This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Reduce garbage produced by invert_truthvalue
- From: Roger Sayle <roger at eyesopen dot com>
- To: Richard Guenther <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 15 Jun 2006 11:50:26 -0600 (MDT)
- Subject: Re: [PATCH] Reduce garbage produced by invert_truthvalue
On Wed, 14 Jun 2006, Richard Guenther wrote:
> 2006-06-14 Richard Guenther <firstname.lastname@example.org>
> * fold-const.c (fold_truth_not_expr): Rename from
> invert_truthvalue. Give it fold_* semantics to avoid
> generating garbage.
> (invert_truthvalue): New function. Wrapper around
> (optimize_minmax_comparison): Avoid creating garbage.
> (fold_unary): Use fold_truth_not_expr for folding
> (fold_ternary): Replace uses of invert_truthvalue with
> fold_truth_not_expr where applicable.
> * tree.h (fold_truth_not_expr): Prototype.
This is OK for mainline. invert_truthvalue is popular enough to
show up in GCC's profiles, so reducing its overhead is a good
thing even in stage3.
! FIXME: one would think we would fold the result, but it causes
! problems with the dominator optimizer. */
Did you check whether this prexisting comment is still true? DOM
has probably changed significantly since this comment was written,
and not being able to canonicalize/fold trees may indicate a real
latent bug somewhere.