Chapter 11. Looking at Output from Compilers

The previous chapter began a discussion about program optimization from the vantage point of an assembly language programmer, including inherent capabilities in the Itanium architecture that are new to the industry. Yet we know that people rarely write programs in assembly language.

This companion chapter continues the discussion about program optimization from the vantage point of a high-level language programmer, including the capabilities for automated optimization that are offered by Itanium compilers. Our treatment will take the form of closely examining the compiler output for quite simple programs.

The full power of modern optimizing compilers scarcely comes into play for simple programs, but we feel that challenging our readers to imagine themselves competing against a compiler in the context of a few transparent examples will reward them for having studied Itanium architecture and assembly language. Seeing the choices that can be made, all of which are logically equivalent to the programmer's intent, can be as illuminating as in the last chapter. At the very least, our readers will learn how to get a glimpse of what happens "underneath" compiled high-level language code when a program is finally expressed in the machine language of the computer on which it is to execute.

While the material covered in this chapter goes beyond what the novice may need in order to comprehend the Itanium architecture in particular, the insights gained here are intended to convey more generally an appreciation that there can be significant differences between compilers for various languages, which warrant attention to options and capabilities. This material may seem difficult, and we know it has only recently started to come into architecture or programming books, but it fills out the general picture of RISC and EPIC architecture that we have hoped to evoke.

When one writes a program in a high-level language, efficiency of the compiled program may depend as much on the adequacy and sophistication of the compiler as on the programmer's choice of algorithm. Indeed, the successful introduction of an entirely new architecture may depend as much on good compilers as on good hardware concepts, especially for advanced designs that are RISC-like at their heart.

Purchasing decisions are based on the perceived performance of particular application(s) on the target platform. We believe that a measure of real science should underlie such critical decisions. This chapter introduces simple investigative methods of which more programmers and decision makers should be aware.



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