Optimizing Compilers for Modern Architectures: A Dependence-Based Approach

Chapter 13: Compiling Array Assignments

13.1 Introduction

Array assignments and expressions have become an important language construct because of the emergence of Fortran 90. Although the Fortran 90 definition took over 13 years and the language was slow to gain widespread acceptance, it is now beginning to replace Fortran 77 as the language of choice for scientific programming.

One reason that the scientific computing community did not immediately embrace Fortran 90 was the slow emergence of mature compiler technology. The language added many new features that presented real problems for the implementer. As a result, Fortran 90 compilers must do much more work to achieve the same relative level of performance as compilers for Fortran 77.

This chapter is intended as a simple introduction to some of the complexities of compiling a single new feature of Fortran 90: the array assignment statement. Although this statement was originally intended to provide a direct mechanism for specifying parallel or vector execution, it must still be carefully implemented for the specific hardware available for execution. In particular, to implement the array assignment on a uniprocessor, the statement must be converted to a scalar loop. This conversion, which is referred to as scalarization, must be done in a way that makes efficient use of the memory hierarchy, no matter what the final target architecture is.

At first glance, scalarization seems simple simply replace each array assignment by a DO-loop whose induction variable iterates over the range of the array triplet in one of the subscripts. However, the problem...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Programming Languages
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.