[Patch, wwwdocs] Update 4.4 release notes for Fortran & OpenMP
Sebastian Pop
sebpop@gmail.com
Tue Sep 16 02:56:00 GMT 2008
On Mon, Sep 15, 2008 at 5:21 PM, Gerald Pfeifer <gerald@pfeifer.com> wrote:
> Added bonus points for adding notes/examples or pointers to those which
> we have in our texi (online) documentation now, I believe?
For more bonus points ;-), here is a longer version. Okay to commit?
Sebastian
*** changes.html 15 Sep 2008 14:44:35 -0500 1.26
--- changes.html 15 Sep 2008 21:49:46 -0500
***************
*** 95,100 ****
--- 95,181 ----
the new array size and the original switch branches does not exceed
the parameter <code>--param switch-conversion-max-branch-ratio</code>
(default is eight). </li>
+
+ <li><p>The <a href="http://gcc.gnu.org/wiki/Graphite">Graphite</a>
+ branch has been merged. This merge has brought in a new
+ framework for loop optimizations based on a polyhedral
+ intermediate representation. These optimizations apply to all
+ the languages supported by GCC. The following new code
+ transformations are available in GCC 4.4:</p>
+
+ <ul>
+ <li><code>-floop-interchange</code>
+ Perform loop interchange transformations on loops. Interchanging two
+ nested loops switches the inner and outer loops. For example, given a
+ loop like:
+ <pre class="smallexample">
+ DO J = 1, M
+ DO I = 1, N
+ A(J, I) = A(J, I) * C
+ ENDDO
+ ENDDO
+ </pre>
+ <p>loop interchange will transform the loop as if the user had written:
+ <pre class="smallexample">
+ DO I = 1, N
+ DO J = 1, M
+ A(J, I) = A(J, I) * C
+ ENDDO
+ ENDDO
+ </pre>
+ <p>which can be beneficial when <code>N</code> is larger than the caches,
+ because in Fortran, the elements of an array are stored in memory
+ contiguously by column, and the original loop iterates over rows,
+ potentially creating at each access a cache miss.</p>
+ </li>
+ <li><code>-floop-strip-mine</code>
+ Perform loop strip mining transformations on loops. Strip mining
+ splits a loop into two nested loops. The outer loop has strides
+ equal to the strip size and the inner loop has strides of the
+ original loop within a strip. For example, given a loop like:
+ <pre class="smallexample">
+ DO I = 1, N
+ A(I) = A(I) + C
+ ENDDO
+ </pre>
+ <p>loop strip mining will transform the loop as if the user had
written:</p>
+ <pre class="smallexample">
+ DO II = 1, N, 4
+ DO I = II, min (II + 4, N)
+ A(I) = A(I) + C
+ ENDDO
+ ENDDO
+ </pre>
+ </li>
+ <li><code>-floop-block</code>
+ Perform loop blocking transformations on loops. Blocking strip mines
+ each loop in the loop nest such that the memory accesses of the
+ element loops fit inside caches. For example, given a loop like:
+ <pre class="smallexample">
+ DO I = 1, N
+ DO J = 1, M
+ A(J, I) = B(I) + C(J)
+ ENDDO
+ ENDDO
+ </pre>
+ <p>loop blocking will transform the loop as if the user had written:</p>
+ <pre class="smallexample">
+ DO II = 1, N, 64
+ DO JJ = 1, M, 64
+ DO I = II, min (II + 64, N)
+ DO J = JJ, min (JJ + 64, M)
+ A(J, I) = B(I) + C(J)
+ ENDDO
+ ENDDO
+ ENDDO
+ ENDDO
+ </pre>
+ <p>which can be beneficial when <code>M</code> is larger than the caches,
+ because the innermost loop will iterate over a smaller amount of data
+ that can be kept in the caches.</p>
+ </li>
+ </ul>
+ </li>
</ul>
<h2>New Languages and Language specific improvements</h2>
More information about the Fortran
mailing list