Re: Optimizing IEEE Floating-Point Operations

jbc@hpcupt3.cup.hp.com (Jeff Caldwell)
19 Jun 91 17:22:27 GMT

          From comp.compilers

Related articles
Optimizing IEEE Floating-Point Operations daryl@hpclopt.cup.hp.com (1991-06-06)
Re: Optimizing IEEE Floating-Point Operations bron@sgi.com (1991-06-11)
Optimizing IEEE Floating-Point Operations bill@hcx2.SSD.CSD.HARRIS.COM (1991-06-14)
Optimizing IEEE Floating-Point Operations eggert@twinsun.com (1991-06-14)
Optimizing IEEE Floating-Point Operations cfarnum@valhalla.cs.wright.edu (1991-06-17)
Re: Optimizing IEEE Floating-Point Operations henry@zoo.toronto.edu (1991-06-17)
Re: Optimizing IEEE Floating-Point Operations bill@hcx2.ssd.csd.harris.com (1991-06-18)
Re: Optimizing IEEE Floating-Point Operations jbc@hpcupt3.cup.hp.com (1991-06-19)
| List of all articles for this month |

Newsgroups: comp.compilers
From: jbc@hpcupt3.cup.hp.com (Jeff Caldwell)
Keywords: arithmetic, optimize
Organization: Hewlett Packard, Cupertino
References: 91-06-005
Date: 19 Jun 91 17:22:27 GMT

> My own *personal* opinion is that this is a legal transformation if and
> only if the runtime system traps (and aborts) on generation of NaN's and
> Inf's.


This sounds like a good idea but raises another question. How about
a sequence such as:


        x = 0.0


        w = x * (y / z)


        where z ends up with the value of 0 at runtime.


If this were allowed to become folded to a value of 0 at compile-time, the
calculation of y/z would never be performed. Since y/z would have been
an invalid operation but has been removed, the runtime trap would never
occur.


I feel the offering of an _option_ that allows the compiler to perform
transformations that may result in missing traps such as this is a
good approach. The idea being that the user can stress test an application
until he is fairly sure it is robust enough to catch invalid operations
such as this before they occur. Then he can use the option to build a
highly optimized production version of the application.


-Jeff Caldwell | HP Calif. Lang. Lab
--


Post a followup to this message

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