From: eachus@spectre.mitre.org (Robert I. Eachus)
Subject: Re: seperate keyword and seperate compilation with Gnat?
Date: 1996/07/17
Date: 1996-07-17T00:00:00+00:00 [thread overview]
Message-ID: <EACHUS.96Jul17113313@spectre.mitre.org> (raw)
In-Reply-To: 4rckva$dj1@Starbase.NeoSoft.COM
Someone asked:
> For example, suppose someone starts worrying whether it is valid to
> compute a + b as (4 * a + b - 3 * a), which could raise intermediate
> overflow.
Lets look at this from a practical point of view. Assume that 4 *
a + b was computed earlier and is available in a register. The
compiler can save one load of b this way, so it could be a
"worthwhile" optimization. Multiplying a by 3 can't cause an overflow
when 4 * a won't, so if you are in the same exception handler scope,
it looks like a valid optimization, even if for other reasons, the
computation of 4 * a + b didn't overflow. (Perhaps 2 * a + b was in a
register, and b is a large negative number.)
So I think it is legal unless it could cause an exception in a
different handler scope, again assuming that there was a partial lying
around.
--
Robert I. Eachus
with Standard_Disclaimer;
use Standard_Disclaimer;
function Message (Text: in Clever_Ideas) return Better_Ideas is...
next prev parent reply other threads:[~1996-07-17 0:00 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-07-02 0:00 seperate keyword and seperate compilation with Gnat? David Morton
1996-07-02 0:00 ` Robert Dewar
1996-07-18 0:00 ` Peter Hermann
1996-07-20 0:00 ` Robert Dewar
1996-07-02 0:00 ` Samuel Mize
1996-07-03 0:00 ` Robert Dewar
1996-07-03 0:00 ` *separate* keyword and *separate* " David Morton
1996-07-03 0:00 ` Robert Dewar
1996-07-17 0:00 ` Robert I. Eachus [this message]
1996-07-02 0:00 ` seperate keyword and seperate " Peter Hermann
1996-07-02 0:00 ` David Morton
1996-07-03 0:00 ` Rob Kirkbride
1996-07-03 0:00 ` Robert Dewar
1996-07-08 0:00 ` michael
1996-07-08 0:00 ` Robert Dewar
1996-07-11 0:00 ` Robert A Duff
1996-07-11 0:00 ` Robert Dewar
1996-07-12 0:00 ` David Morton
1996-07-12 0:00 ` Robert Dewar
1996-07-16 0:00 ` Michael Paus
1996-07-08 0:00 ` John Herro
1996-07-08 0:00 ` Robert Dewar
1996-07-08 0:00 ` Robert Dewar
1996-07-10 0:00 ` John Herro
1996-07-10 0:00 ` Robert Dewar
1996-07-09 0:00 ` Robert A Duff
1996-07-09 0:00 ` Robert Dewar
1996-07-09 0:00 ` progers
1996-07-08 0:00 ` Robert A Duff
1996-07-03 0:00 ` Robert A Duff
1996-07-03 0:00 ` Mike Card (x3022)
1996-07-04 0:00 ` Jon S Anthony
1996-07-03 0:00 ` Robert Dewar
1996-07-03 0:00 ` Robert Dewar
1996-07-04 0:00 ` Robert A Duff
1996-07-05 0:00 ` Jon S Anthony
1996-07-06 0:00 ` Robert Dewar
1996-07-05 0:00 ` Jon S Anthony
1996-07-09 0:00 ` Jon S Anthony
1996-07-09 0:00 ` Jon S Anthony
1996-07-09 0:00 ` Robert Dewar
1996-07-12 0:00 ` Jon S Anthony
1996-07-21 0:00 ` Robert A Duff
1996-07-11 0:00 ` Jon S Anthony
1996-07-11 0:00 ` Robert A Duff
1996-07-12 0:00 ` Robert Dewar
1996-07-14 0:00 ` Norman H. Cohen
1996-07-15 0:00 ` Robert Dewar
1996-07-15 0:00 ` Jon S Anthony
1996-07-15 0:00 ` Robert Dewar
1996-07-16 0:00 ` Jon S Anthony
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox