Re: polynomial evaluation in GF(2) and common subexpression elimination

Chris F Clark <cfc@shell01.TheWorld.com>
26 Jun 2005 11:17:20 -0400

          From comp.compilers

Related articles
polynomial evaluation in GF(2) and common subexpression elimination panneton@hotmail.com (rng) (2005-06-21)
Re: polynomial evaluation in GF(2) and common subexpression eliminatio DrDiettrich@compuserve.de (Hans-Peter Diettrich) (2005-06-23)
Re: polynomial evaluation in GF(2) and common subexpression eliminatio drizzle76@gmail.com (drizzle) (2005-06-23)
Re: polynomial evaluation in GF(2) and common subexpression eliminatio emailamit@gmail.com (Amit Gupta) (2005-06-24)
Re: polynomial evaluation in GF(2) and common subexpression eliminatio cfc@shell01.TheWorld.com (Chris F Clark) (2005-06-26)
| List of all articles for this month |

From: Chris F Clark <cfc@shell01.TheWorld.com>
Newsgroups: comp.compilers
Date: 26 Jun 2005 11:17:20 -0400
Organization: The World Public Access UNIX, Brookline, MA
References: 05-06-101 05-06-109
Keywords: code, optimize, comment

Dodi wrote:
> A transformation of a^2-b^2 into (a+b)*(a-b) instead is most
> probably out of the optimization capabilities of an compiler.


Long ago at Pr1me computer, we wrote a peephole optimizer for the IL
(intermediate language) and one for the generated code too, which did
just that. We also turned those optimizations off by default (put
into the "unsafe" category, if I recall correctly) when we had
numerical analysts come back and show us how we broke their code.
(Keeping calculations in registers and not truncating them to "storage
precision" can have very unexpected results.) However, the
optimizations did help for the Whetstone benchmark which was the
reigning way of calculating MIPS back then....


Hope this helps,
-Chris


*****************************************************************************
Chris Clark Internet : compres@world.std.com
Compiler Resources, Inc. Web Site : http://world.std.com/~compres
23 Bailey Rd voice : (508) 435-5016
Berlin, MA 01503 USA fax : (978) 838-0263 (24 hours)
[Fortran 66 said that you could do any expression reorganzation you wanted
that was valid by the rules of arithmetic and respected parentheses. Buncha
wimpy numerical programmers if you ask me. -John]


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.