This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Fortran: The Road Ahead.
- To: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- Subject: Re: Fortran: The Road Ahead.
- From: "Orn E. Hansen" <oe dot hansen at oehansen dot pp dot se>
- Date: Mon, 8 Dec 1997 01:53:29 +0100 (CET)
- cc: egcs at cygnus dot com
- Reply-To: "Orn E. Hansen" <oe dot hansen at oehansen dot pp dot se>
> do i = 1, n
> <body1>
> if (lcond) then
> <body2>
> else
> <body3>
> endif
> <body4>
> enddo
You could select variant I, if lcond will always yield the same
condition for any i. And II if <body1> and <body4> are independant
and not products of <body2> or <body4>. The save goes from O(4n)
downto O(3n + 1), which can be great for a large n (or expensive
lcond). But most times, <body4> will use a product of in-loop
condition of <body2> or <body4> (hence it's position), making a
transformation impossible.
----------------------------------------------------------------------------
Orn Einar Hansen oe.hansen@oehansen.pp.se
oehansen@daimi.aau.dk
voice+fax; +46 035 217194