We have also assigned operand labels to the values

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: destination, which in this case is the final vector element. This value is therefore set first to 1, then to ¾ ¡ ½ ¾, and then to ¿ ¡ ¾ . On the final iteration this value is then multiplied by itself to yield a final value of 36. For the case of combine4, the vector remains unchanged until the end, when the final element is set to the computed result ½ ¡ ¾ ¡ ¿ ¡ ¿¼. Of course, our example showing the distinction between combine3 and combine4 is highly contrived. One could argue that the behavior of combine4 more closely matches the intention of the function description. Unfortunately, an optimizing compiler cannot make a judgement about the conditions under which a function might be used and what the programmer’s intentions might be. Instead, when given combine3 to compile, it is obligated to preserve its exact functionality, even if this means generating inefficient code. 5.7 Understanding Modern Processors Up to this point, we have applied optimizations that did not rely on any features of the target machine. They simply red...
View Full Document

This note was uploaded on 09/02/2010 for the course ELECTRICAL 360 taught by Professor Schultz during the Spring '10 term at BYU.

Ask a homework question - tutors are online