Back in the early 1990’s, compilers for DSP processors were pretty lame. Even if a compiler generated code that was functionally correct (which, sadly, wasn’t always the case) the code was usually far from efficient. At the time, this wasn’t a big deal: DSP applications were still fairly small (in terms of lines of code), and DSP processor architectures weren’t nearly as complex as they are today. A reasonably skilled DSP software engineer could optimize an application by hand, sometimes entirely in assembly language, without using a compiler at all.
Almost 20 years later, things have changed, in a big way. Applications and processors are much, much more complex; implementing an entire application in assembly language isn’t an option. Also, developers have many more things to worry about, and are less able to delve into the nitty-gritty details of code optimization. As a result, having a strong compiler that generates efficient code has become a critical piece of fielding a commercially successful DSP processor—perhaps even more important than the quality of the processor architecture itself.
Processor vendors that have made long-term, serious investments in compiler development have a big advantage over those who have focused mainly on developing chips. An excellent architecture with a so-so compiler may very well be trounced by a so-so architecture with an excellent compiler. If you’re a processor vendor with a mediocre compiler, you’ve got a serious problem. Creating an excellent compiler requires a substantial, sustained effort—often over a period of years.
One interesting implication of the increased importance of compilers is that the most widely used general-purpose CPUs have gained an advantage over typical DSP processors for DSP applications. CPU vendors have long been forced to focus on compilers because of the large number of CPU software developers who rely exclusively on the compiler to generate code. And, because of their larger user base, the most popular CPU architectures are often supported by multiple compilers—setting up competition that tends to speed innovation. DSP processors, in contrast, usually have only one compiler.
Although DSP processors can offer significant performance and efficiency advantages at the architectural level, these advantages may be erased when comparing compiled code. Neglecting to field a world-class compiler is a mistake. Good architectures are important, but without a good compiler, a good architecture is like an exotic sports car that’s not street-legal: nice to look at, but impossible to use.
Jennifer Eyre White of BDTI contributed to this column.
Add new comment