2
Retargetable C/C++ Compiler
The compiler offers the following features:
• A unique approach to automatically adapt (retarget) the compiler to the processor architecture, based on the nML processor
modeling language
• Architectural exploration using Compiler-In-The-Loop technology. Users can describe alternative processor architectures in nML
and compare their performance by compiling benchmark C/C++ programs onto each architecture and evaluating the results
• Support for a wide range of processor architectures, from general-purpose processors to highly specialized ASIPs
• Support for the following programming languages:
– C, optionally extended with user-defined data types and operators using C++ classes, member functions
and function overloading
– C++ (leveraging LLVM compiler front-end technology extended for user-defined data-types, native pointers,
multiple address spaces, addressable unit sizes wider than byte)
– OpenCL C (OpenCL kernel language)
• Efficient compiler optimizations, including:
– High-level code optimizations, including alias analysis for effective software pipelining and exploitation of various
addressing schemes
– Code selection, exploiting the use of specialized instruction patterns (not restricted to tree patterns)
– Register allocation, supporting distributed register files where instruction-level parallelism depends on the register choice.
Separate register allocation and register assignment passes for effective interaction with scheduling
– Efficient implementation of subroutines, including inter-procedural context-save optimization, multiple register sets for fast
context switching, and reverse in-lining to reduce code size
– Scheduling with software pipelining of loops, including exploitation of negative dependency lengths (aggressive scheduling)
to deal with long latencies in deep pipelines
– Support of advanced control-flow constructs in C programs for vector processors, using per-lane predication and vector
predicate stacks
– Whole-function vectorization and barrier synchronization of OpenCL C programs
– Support of intrinsic function calls and of in-line assembly code
• Light-weight C/C++ library stack (libc++lite) tuned to embedded applications, offering maximum functionality while avoiding
code bloat
• Generation of binary machine code in the Elf object-file format, including source-level debug information in Dwarf sections
• Integrated in ASIP Designer’s graphical development environment (IDE), including an option for integration in Eclipse
Key Architectural Features Supported by the Retargetable Compiler
Arithmetic • General-purpose as well as application-specic arithmetic units
Data types
• General-purpose as well as application-specic data types
(e.g. fractional, custom floating point, complex, and vector data-types)
Pipeline
• From shallow to deep instruction pipelining
• Exposed or protected pipeline
• Multi-cycle and multi-word instructions, delay slots
• Resolution of pipeline hazards by the compiler
Instruction format
• From orthogonal to highly encoded instruction formats
• Support of variable-length instructions and instruction compaction
Memory architecture
• Support of multiple memories and multiple memory ports
• Large variety of addressing modes, including: indexed, direct and indirect addressing, with post-
modication, circular buffering, etc.
• Up to 64-bit address space support
• Both little-endian and big-endian supported
Register architecture
• From general-purpose register-les to special-purpose registers
• Support of coupled operand and/or result registers