ABSTRACT

Previous chapters have discussedmany of the tools available to a programmer looking to parallelize code by hand. While valuable, each requires considerable effort by the programmer beyond that which is required for a typical single-threaded program. As more power is placed in the hands of the programmer, programmers must concern themselves with additional issues only posed by parallel programs-race conditions, deadlock, livelock, and more [1-3]. Furthermore, sequential legacy code presents its own problem. Not designed with parallelism in mind, the programmer may encounter great trouble in transforming the code to a parallel form. Automatic parallelization offers another option to programmers interested in par-

allelizing their code. Automatic parallelism extraction techniques do not suffer the same limitations as manual parallelization. Indeed, through analysis, a compiler can often find parallelism in sequential code that is not obvious even to a skilled programmer. However, automatically parallelizing code poses a significant challenge of its own: finding means to extract and exploit parallelism in the code. The compiler must determine first what transformations can be done, and throughout this chapter, we will see a number of the possible techniques in the compiler’s transformation toolbox. Simply put, this means the compiler must both find an exploitable region of code through analysis and transform the code into a parallel form. Analyses and transformations must work together to find and then exploit parallelization opportunities.