Chapter 1
4 MIPS R4000 Microprocessor User's Manual
Optimizing Compilers
RISC architecture is designed so that the compilers, not assembly
languages, have the optimal working environment. RISC philosophy
assumes that high-level language programming is used, which contradicts
the older CISC philosophy that assumes assembly language programming
is of primary importance.
The trend toward high-level language instructions has led to the
development of more efficient compilers to convert high-level language
instructions to machine code. Primary measures of compiler efficiency are
the compactness of its generated code and the shortness of its execution
time.
During the development of more efficient compilers, analysis of
instruction streams revealed that the greatest amount of time was spent
executing simple instructions and performing load and store operations,
while the more complex instructions were used less frequently. It was also
learned that compilers produce code that is often a narrow subset of the
processor instruction set architecture (ISA). A compiler works more
efficiently with instructions that perform simple, well-defined operations
and generate minimal side-effects. Compilers do not use complex
instructions and features; the more complex, powerful instructions are
either too difficult for the compiler to employ or those instructions do not
precisely fit high-level language requirements.
Thus, a natural match exists between RISC architectures and efficient,
optimizing compilers. This match makes it easier for compilers to
generate the most effective sequences of machine instructions to
accomplish tasks defined by the high-level language.