With the emergence of new and customizable instruction set architectures like RISC-V, compiler developers face the challenge of keeping up with the latest chip designs by developing new compiler backends with code generators that support them. With new chip designs always around the corner, compiler developers need to move quickly, too.

Customizable instruction set architectures (ISAs) like RISC-V can be extended with highly optimized instructions to bring innovative domain-specific chips onto the market. However, these chips can only be utilized to their full potential with proper compiler support. Compilers are typically not developed from scratch but built on top of existing compiler development platforms like GCC and LLVM. These platforms already provide C and C++ front ends, optimizations, and a more or less retargetable code generator. The compiler developer’s task is to develop a code generator for the new ISA.

SuperTest Code Generator Trainer
The SuperTest Code Generator Trainer (CGTrainer) was created to make this process as quick and efficient as possible. It consists of nearly 1000 test files, split over 25 carefully ordered levels. Each level addresses a specific capability of the code generator. For example, level 0 sets up the minimal interface that is needed to run the tests. The next levels introduce simple integer arithmetic, conversions, pointers, addressing modes for structures, register allocation, control flow, and calling conventions. Beyond that are levels dealing with characters and shorts, long arithmetic, and much more. Each level is constructed to build upon the groundwork of the previous levels, guiding the compiler developers through the development process.

High-Quality Compilers
Once the foundation for supporting an ISA is in place, SuperTest’s conformance test suites continue where CGTrainer’s levels end. These extensive test suites verify the compiler’s front end, optimizations, and many more nitty-gritty details of code generation. No matter if you stick to the standard ISA or add support for specific extensions, SuperTest ensures you’re ready to support the latest chip designs with a high-quality compiler in no time.

Want to experience total control over your compiler development process? Click here to download the SuperTest demo. The first few CGTrainer levels are included for free, as well as a handful of test samples from SuperTest’s extensive conformance test suites.

 

Remi van Veen, Qualification Lead Engineer


Subscribe to our monthly blog!