Summary

This chapter has extended the discussion of optimization begun in Chapter 10 at the assembly language level to an exploration of the sophisticated capabilities of compilers for high-level languages. Our examination of compiler output has explored the effect of numerous levels and types of optimization, primarily on one very short program in similar versions expressed in the C and FORTRAN programming languages.

We have explained how to find out what actual sequence of machine instructions a compiler has generated. Different compilers for Linux and HP-UX programming environments operating at ostensibly similar levels of optimization produced machine code that varied in appearance, but still conformed to the programmer's logical intent and to the strictures of the Itanium architecture and programming conventions.

We saw different loop designs, different ways to multiply by a small power of 2, and different organizations and addressing of local storage. Some compilers aggressively eliminated dead code.

We presented a trivial sample program that showed how a compiler can bring a function inline as a means of further optimization.

Compiler refinement continues as an important practical aspect of computer science. Advances will be critical for attainment of the full potential of implementations of the Itanium architecture. We concluded the chapter with a serendipitous observation that one Itanium compiler rewrote the programmer's control flow in a function, substituting a simple branching technique in place of recursive calls in order to improve performance.

Further examination of the internal operation of compilers, or the theoretical approaches behind their design and construction, would lie well beyond the scope of this book on the Itanium architecture.



ItaniumR Architecture for Programmers. Understanding 64-Bit Processors and EPIC Principles
ItaniumR Architecture for Programmers. Understanding 64-Bit Processors and EPIC Principles
ISBN: N/A
EAN: N/A
Year: 2003
Pages: 223

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net