This is the mail archive of the gcc-patches@gcc.gnu.org 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] 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
--


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