Categories

VectorC Retargetable Compiler Platform

These pages describe the advanced compiler technology features of Codeplay s VectorC compiler engine. VectorC has been designed to be easily customised (adding built-in intrinsics, types, operators), making it very suitable for use in creating custom-built C and C++ compilers for new processor designs.

C/C++ Support

The VectorC engine supports C, C++, and is also one of the first commercial compilers to include support for the most useful C++0x features (such as auto and delegating constructors).

VectorC can compile source code with multiple proprietary source extensions. It has built-in support for:

Microsoft style C++ extensions

GCC style extensions

Both Microsoft and GCC inline assembly formats

HLSL extensions

Altivec extensions

C++ ABI compatible with Visual Studio and GCC

VectorC also supports C++ to C compilation through a fully featured C backend. VectorC can easily be configured to support new language extensions, backends, and optimization pathways.

Optimizations

VectorC performs all the standard non-vector optimizations expected of a high-performance compiler. As the engine understands multiple memory spaces and distributed latencies, it can optimize data-movement through double-buffered streaming DMA when required, in addition to standard write combining and prefetching functions.

Common optimization core so that all appropriate existing optimizations can be used on the new architecture

Software pipelining so that loops can be automatically parallelized on pipelined architectures.

Vectorization so that fast SIMD vector code can be produced from scalar or vector source code on SIMD architectures.

Portable intrinsic functions that let users write complex vector operations as built in functions. VectorC converts these into the best combination of instructions on each architecture that the source code is compiled for.

Vectorization

Vectorizing is the art of recognising implicit parallelisms in standard C and C++ code and automatically taking advantage of advanced CPU 'vector' units via SIMD instruction such as MMX, SSE/SSE2, 3D Now and even Altivec when output to C. VectorC, as it s name implies, was designed to exploit vectorization from the outset.

Development Integration

Codeplay has made it easy to adapt VectorC and gain the advantages of working with the familiar Microsoft Visual Studio environment through comprehensive support for the Microsoft ABI. All it takes is a mouse click to switch compilation units over to VectorC from within the Visual Studio IDE.

For GCC users, we support the GCC command line syntax.

The Interactive Optimizer

When speed is of the essence, carefully considered code adjustment is required. VectorC s Interactive Optimizer removes the guesswork in that process and displays the quality of the output assembly of your code along with helpful optimization advice.

Custom Calling Conventions

Another unique VectorC feature, Codeplay's custom calling conventions provide a mechanism to lower function calling overhead and speed up code. GNU inline assembly support is provided as standard within VectorC.

Native implementations

VectorC is available as a native implementation on Windows based architectures native support on Linux-based architectures will be made available when justified by customer demand.

C Backend

Our C source backend allows us to output optimized C++ with or without multicore extensions in the case where rapid prototyping onto a custom accelerator processor is required, and a C compiler for the target already exists. This gives VectorC a distinct advantage over other solutions it can compile C++ code to any architecture which has an existing C compiler. Current implementations have been tested on Windows and Linux with x86, PowerPC Linux, and Cell Linux. The C source is fully compatible with existing C and C++ libraries compiled with Visual Studio or GCC.

Complete System

VectorC has been developed from the ground up over a period of 10 years and has no third-party product dependencies.

Compilers for new architectures can be quickly developed from existing architecture support.

In addition to our advanced optimizations, the full range of normal compiler optimizations are available e.g. global common sub expression elimination, constant folding, use of conditional moves, instruction scheduling, register allocation.