VectorC {VU} Features
VectorC {VU} is a Win32 compiler that works within CodeWarrior and Visual Studio 6 which takes C/C++ source and outputs .dsm files which may be assembled by either SCEI's ee-dvp-as or SN System's ps2dvpas assemblers.
In addition Win32 application called the Interactive Optimizer is also included which provides a GUI containing the (editable) input source, compiler options (such as the target VU) and output VU assembly. The Interactive Optimizer also displays the compiler advice which provides reasons why the source code was not vectorized and/or other optimization hints complete with links to an online help explaining the full meaning of this advice.
Note: We cannot show a screenshot on this public web site, however the Interactive Optimizer is functionally similar to that provided with VectorC {PC} which is shown on this page.
Vectorization features
Codeplay's compilers were built from the ground up to take advantage of new CPU features such as the SIMD (Single Instruction Multiple Data) instructions found on modern x86 processors. As a result our x86 compiler has the most powerful autovectorization features of any C compiler in the world today. The PlayStation®2's vector units, VU0 and VU1, are simple CPUs but powerful vector processors. That makes them an ideal target for Codeplay's autovectorization technology.
What this means is that standard C/C++ source code can be written which works on several data elements and yet VectorC {VU} will recognise the implicit parallelism in C/C++ source code and combines these operations into vector processing instructions of the PS2's vector units.
Because of the nature of the C/C++ high level language, the compiler cannot always autovectorize. However in these instances the compiler will provide feedback to the programmer on why this is the case. This feedback can be viewed via the command line or the Interactive Optimizer and may include recommendations for adding special transparent language additions to the code so the compiler can vectorize the most complex of loops.
Programmers may optionally also use intrinsic functions or even define C++ vector classes and use operator overloading, these will also result in perfect vectorization of the source code.
Optimization features
Codeplay second generation compilers (2.0+), feature powerful general optimizations which include the following:
- Software pipelining
- Common sub-expression elimination.
- Schedules in-line assembly.
- Strength reduction.
- Configurable loop unrolling.
- Loop induction variable.
- Instruction scheduling.
- Code hoisting.
- Memory read/write elimination.
- Dead code elimination.
- Loop-invariant calculations are moved out of loops.
Licensed PlayStation®2 developers can obtain evaluation software by following this link (user and password required)
PlayStation is a registered trademark of Sony Computer Entertainment Inc.
|