From: l117593@cliffy.lfwc.lockheed.com (Cordes MJ)
Subject: Re: Can compilers do this?
Date: 1996/02/23
Date: 1996-02-23T00:00:00+00:00 [thread overview]
Message-ID: <4gl4lq$7aa@cliffy.lfwc.lockheed.com> (raw)
In-Reply-To: 4gjd6g$mfq@newsbf02.news.aol.com
BWBurnsed (bwburnsed@aol.com) wrote:
<snip>
: Also, suppose Y and X are floating point variables, and M and B are
: CONSTANT floating point variables (not named numbers) initialized to
: 1.0 and 0.0 respectively. If one writes
: Y := M * X + B ;
: can (and will) any compiler reduce this to
: Y := X ;
I can't say that all compilers will perform this optimization, but
the Tartan VMS/1750 Ada compiler does (at its standard optimization
level).
We have seen cases where some compilers will perform the optimization
if the statement is written as:
Y := (M * X) + B;
but it will not perform the optimization when written as you
originally posted.
--
---------------------------------------------------------------------
Michael J Cordes
Phone: (817) 935-3823
Fax: (817) 935-3800
EMail: CordesMJ@lfwc.lockheed.com
---------------------------------------------------------------------
next prev parent reply other threads:[~1996-02-23 0:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-02-22 0:00 Can compilers do this? BWBurnsed
1996-02-23 0:00 ` Cordes MJ [this message]
1996-02-23 0:00 ` Robert Dewar
1996-02-23 0:00 ` Robert Dewar
1996-02-23 0:00 ` Mark A Biggar
1996-02-24 0:00 ` Robert A Duff
1996-02-23 0:00 ` Robert Dewar
1996-02-25 0:00 ` Robert Dewar
1996-02-23 0:00 ` Stuart Palin
1996-02-26 0:00 ` Robert I. Eachus
1996-02-26 0:00 ` BWBurnsed
-- strict thread matches above, loose matches on Subject: below --
1996-02-26 0:00 Marin David Condic, 407.796.8997, M/S 731-93
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox