Single source compiler, using OpenMP
The Cell BE compiler is a single-source compiler, using OpenMP directives to control compilation. For instance, a developer might write code like this:
#pragma Omp parallel for
for (i = 0; i < 10000; ++i)
A[i] = x * B[i];
|
The compiler then outlines the omp region, creating a new function that performs only this work. This is cloned into two versions, one to run on the PPE, and one to run on the SPE.
At runtime, the SPE version of the code uses DMA to obtain chunks of
data, and uses the software cache if necessary for lookups (for
instance, of the value x in the above example). On the
PPE, the OpenMP runtime is initialized, which begins handing off pieces
of the loop to the SPEs. The PPE may also participate in calculations
if desired.
The Cell Broadband Engine architecture offers a very dense computing architecture, with heterogeneous parallelism.
The compiler presents the application writer with a wide range of tools. These tools range from support to allow a developer to hand-tune code to extract maximum possible performance, to support for largely automatic management of the Cell BE processor, giving maximum programmer productivity.
The compiler has demonstrated reasonable speedups using automatic tuning, simdization, and support for the shared-memory abstraction.
Part 2 of this tutorial series takes a much closer look at SPE optimizations, such as instruction fetch timing and branch hinting.
This tutorial series is based on the original presentation Optimizing Compiler for the Cell Processor given at PACT 2005 by Alexandre Eichenberger, Kathryn O'Brien, Kevin O'Brien, Peng Wu, Tong Chen, Peter Oden, Daniel Prener, Janice Shepherd, Byoungro So, Zehra Sura, Amy Wang, Tao Zhang, Peng Zhao, and Michael Gschwind of IBM Research.
Part 1 is based on the section "Cell Architecture and Compilation Techniques."
Cell Broadband Engine is a trademark of Sony Computer Entertainment Inc.

