19-05-2012, 04:49 PM
Hardware and Software for VLIW and EPIC
Hardware and Software for.pdf (Size: 269.01 KB / Downloads: 45)
Introduction: Exploiting Instruction-Level Parallelism Statically
In this chapter we discuss compiler technology for increasing the amount of parallelism
that we can exploit in a program as well as hardware support for these
compiler techniques. The next section defines when a loop is parallel, how a
dependence can prevent a loop from being parallel, and techniques for eliminating
some types of dependences. The following section discusses the topic of
scheduling code to improve parallelism. These two sections serve as an introduction
to these techniques.
We do not attempt to explain the details of ILP-oriented compiler techniques,
since that would take hundreds of pages, rather than the 20 we have allotted.
Instead, we view this material as providing general background that will enable
the reader to have a basic understanding of the compiler techniques used to
exploit ILP in modern computers.
Detecting and Enhancing Loop-Level Parallelism
Loop-level parallelism is normally analyzed at the source level or close to it,
while most analysis of ILP is done once instructions have been generated by the
compiler. Loop-level analysis involves determining what dependences exist
among the operands in a loop across the iterations of that loop. For now, we will consider only data dependences, which arise when an operand is written at some
point and read at a later point. Name dependences also exist and may be removed
by renaming techniques like those we explored in Chapter 2.
Finding Dependences
Finding the dependences in a program is an important part of three tasks: (1)
good scheduling of code, (2) determining which loops might contain parallelism,
and (3) eliminating name dependences. The complexity of dependence analysis
arises because of the presence of arrays and pointers in languages like C or C++,
or pass-by-reference parameter passing in FORTRAN. Since scalar variable references
explicitly refer to a name, they can usually be analyzed quite easily, with
aliasing because of pointers and reference parameters causing some complications
and uncertainty in the analysis.