This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Reduce garbage produced by invert_truthvalue

On Wed, 14 Jun 2006, Richard Guenther wrote:
> 2006-06-14  Richard Guenther  <>
> 	* 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
> 	fold_truth_not_expr.
> 	(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.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]