This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Fortran: The Road Ahead.


>       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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]