This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Optimize x*x*x*x*x*x using 3 multiplications.
- From: Roger Sayle <roger at eyesopen dot com>
- To: Michael Matz <matz at suse dot de>
- Cc: Zack Weinberg <zack at codesourcery dot com>, Richard Henderson <rth at redhat dot com>, <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 1 Aug 2003 07:24:08 -0600 (MDT)
- Subject: Re: [PATCH] Optimize x*x*x*x*x*x using 3 multiplications.
Hi Michael,
> The current version shouldn't change the the parallelism systematically.
> It just reorders operands, but doesn't change for instance the number of
> operators. With an extended version of course this would be the case.
> But it does fix some (artificial I admit) CSE cases.
But doesn't it linearlize the expression tree? For example, turning
(a+b)+(c+d) into ((a+b)+c)+d. This has the same number of operators
but in the original (a+b) and (c+d) could be evaluated in parallel or
scheduled to overlap in a pipelined processor.
I haven't read your patch carefully, so I might be completely wrong!
Roger
--