Hardware Reference
In-Depth Information
FIGURE A.20 Major types of optimizations and examples in each class . These data tell
us about the relative frequency of occurrence of various optimizations. The third column lists
the static frequency with which some of the common optimizations are applied in a set of 12
small Fortran and Pascal programs. There are nine local and global optimizations done by the
compiler included in the measurement. Six of these optimizations are covered in the figure,
and the remaining three account for 18% of the total static occurrences. The abbreviation
N.M . means that the number of occurrences of that optimization was not measured.
Processor-dependent optimizations are usually done in a code generator, and none of those
was measured in this experiment. The percentage is the portion of the static optimizations that
are of the specified type. Data from Chow [1983] (collected using the Stanford UCODE com-
piler).
Figure A.21 shows the effect of various optimizations on instructions executed for two pro-
grams. In this case, optimized programs executed roughly 25% to 90% fewer instructions than
unoptimized programs. The figure illustrates the importance of looking at optimized code be-
fore suggesting new instruction set features, since a compiler might completely remove the
instructions the architect was trying to improve.
 
Search WWH ::




Custom Search