This analysis is conrmed by actual measurements of

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: rithms to determine what values are computed in a program and how they are used. They can then exploit opportunities to simplify expressions, to use a single computation in several different places, and to reduce the number of times a given computation must be performed. Unfortunately, optimizing compilers have limitations, due to constraints imposed on their behavior, to the limited understanding they have of the program’s behavior and how it will be used, and to the requirement that they perform the compilation quickly. Compiler optimization is supposed to be invisible to the user. When a programmer compiles code with optimization enabled (e.g., using the -O command line option), the code should have identical behavior as when compiled otherwise, except that it should run faster. This requirement restricts the ability of the 5.1. CAPABILITIES AND LIMITATIONS OF OPTIMIZING COMPILERS compiler to perform some types of optimizations. Consider, for example, the following two procedures: 1 2 3 4 5 6 7 8 9 10 205 v...
View Full Document

Ask a homework question - tutors are online