CoSy 2013 Spring Edition

CoSy 2013 Spring Edition

Since the beginning of this CoSy Release our CoSy compiler development system has never stopped evolving. As the harsh Dutch winter drew on, and on, we were hard at work putting the finishing touches to our finest update ever. To celebrate the arrival of spring we named it the CoSy 2013 Spring Edition.

This edition features a 15% out-of-the-box performance improvement over our last major Release (measured across 100+ industry-standard benchmarks). The CoSy 2013 Spring Edition is more robust and provides a better generic compilation and optimization strategy than before. We also made compelling improvements to both code quality and stability based on both customer and internal feedback.

Since the beginning of this Release we have improved a great number of things - 80 solved improvement requests and 335 resolved bug reports. Some of the highlights we are most proud of are listed below (for fast access, click on a shortcut to jump to the appropriate section):


Flexibility for Advanced Processor Architectures
The compiler development system has been extended with new functionality to better tune CoSy compilers for advanced architectures and specialized application domains.

New Target-Interface Mechanism (Back to top)
Accurately steer compiler optimization and lowering passes to make the best use of specific architecture properties with user-programmable target interfaces. Target interfaces have visibility on full engine context, data structures and analysis functors. We have provided numerous hooks to a large number of engines and we are open to suggestions to extend our compiler passes with new target interfaces. You can read more about it in the application note, download in PDF.

Using Code Generator Feedback in more optimizations (Back to top)
We use matcher feedback in our compilers to do better decision-making in several middle-end passes such as common sub-expression elimination (engines/cse) and loop-invariant code motion (engines/loopinvariant) and lowering engines (e.g. engines/lowerselect).

Increased support for challenging DSP architecture features (Back to top)
CoSy's flexible and adaptive type description enables unconventional data types with parameterizable data size, alignment, etc in a consistent way. This not only enables native type support for non-mainstream DSP design, but it also permits the native support of language specificity. For DSP architecture characteristics such as size-restricted zero-overhead loop units, target interfaces exist to tune compiler flow and loop unrolling behavior.

More functionality with more than 20 new compiler engines (Back to top)
New CoSy engines now exploit constant tables, use efficient copying of complex data structures, provide optimized initialization of local constant data, and offer improved lowering of special types such as 'long long' and 'complex' to emulation libraries when there is no, or only partial, hardware support available.

Accurate compiler tuning with 100+ new engine options (Back to top)
Features and functionality of engines have been extended and are controllable with switches. More than 100 new engine options were added to better steer optimizations and to better tune and debug compilers. This further complements CoSy's flexibility in engine phase ordering described with EDL. The new engine options are explained in the revised documentation.

New (Incremental) Register Allocator (Back to top)
We added a new incremental register allocator which operates on register subsets to enable register allocation in phases. This optimizes tuning of critical loops and adds more flexibility to the code generator. It also allows finer-grained tuning for specialized architectures where special register restrictions are present (e.g. predicated execution with predicate registers), where there is high register pressure, and where hardware loops are used.

Register Allocator- Scheduler feedback (Back to top)
The register allocator has been extended with a mechanism that allows it to be advised that two pseudo registers are not allocated in the same register or that a pseudo register is not allocated in some specific set of registers. This can be used to create a feedback loop from the SWP scheduler to the register allocator to reduce the number of cycles of the software-pipelined loop body.

Building Optimizing Compilers

Out-of-the-box Analysis (Back to top)
Value range analysis powers a large number of CoSy engines. CoSy calculates the possible value ranges of variables within code fragments for code quality and optimal performance. Memory disambiguation analysis provides enhanced alias analysis on objects. Together these techniques help generate better optimized code and improve compile-time performance.

Code-generator Optimization (Back to top)
Register availability analysis in the code generator after register allocation allows the reuse of values already available in registers. Our improved back-end generator offers instruction clustering facility which enables advanced peepholing. This approach results in significant improvements to compile-time and run-time performance.

Loop Handling (Back to top)
ACE has made significant improvements in the recognition of loop control variables, for example in the presence of conversions that use "short" type loop control variables. These improvements provide more loop candidates to all loop optimizers (loopscalar, loopinvariant, etc.). These loop types are predominant in certain kinds of application code (such as LTE embedded code) as well as in EEMBC benchmarks (including CoreMark).

Easily Add Language Features to your Compiler

C99 Complex Float, Complex Fixed-Point and Extended Integer Types (Back to top)
CoSy now provides automated lowering of complex fixed-point types from the front-end to a complete emulation library for complex fixed-point operations. CoSy also offers a parameterizable and flexible use of extended integer types. The CoSy IR supports complex types and non-standard integer types such as 48-bit integers through transformations, analysis, and safeguarding arithmetic. Rounding and modulo wrapping behavior is carried out cleanly and safely. These types are used a lot in high-performance LTE platforms.

Full Embedded-C Integration with C99 - Complex Fixed Point (Back to top)
CoSy includes support for C99's Complex with Embedded C's Fixed-Point (_Fract and _Accum) types to get support for Complex Fixed Point with normal saturation and modulo wrapping behavior.

Floating Point and Long Long Types (Back to top)
Emulation libraries for floating-point and long long types are provided with CoSy. Using these types on target machines without dedicated floating-point units or long integer registers can be easily performed by providing the code-generation rules. The emulation libraries automatically handle unimplemented operations.

Usability improvements

Documentation (Back to top)
CoSy 2013 Spring Edition collects the most accurate, complete, and up-to-date reference documentation we have ever produced.

Platform Support for RHEL 5.4 (64-bit) (Back to top)

Compiler Development Usability (Back to top)
The all new 'sdlconvert' tool reduces the compiler build time by a factor of three. Derived operators help deliver better efficiency in the matcher. Integrated check and dump engines have been added for Low-level IR (LIR) engines to improve compiler debugging in every code generator engine.

Compiler Usability for End-Users (Back to top)
We put considerable work into improving the C front-end. It now has more configurable diagnostics and integrates better into common IDEs. CoSy compilers now generate column information in diagnostics and debug information. We investigated compile-time performance; despite the improvements we measured that in the last twelve months we reduced compile-time of our benchmark base of around 55%.


The CoSy 2013 Spring Edition is readily available.