This preview shows page 1. Sign up to view the full content.
Unformatted text preview: ing our CPE to 2.0, rather than the theoretical value of 1.5. We have seen earlier that two’s complement arithmetic is commutative and associative, even when overﬂow occurs. Hence for an integer data type, the result computed by combine6 will be identical to that computed by combine5 under all possible conditions. Thus, an optimizing compiler could potentially convert the code shown in combine4 ﬁrst to a two-way unrolled variant of combine5 by loop unrolling, and then to that of combine6 by introducing parallelism. This is referred to as iteration splitting in the optimizing compiler literature. Many compilers do loop unrolling automatically, but relatively few do iteration splitting. On the other hand, we have seen that ﬂoating-point multiplication and addition are not associative. Thus, combine5 and combine6 could potentially produce different results due to rounding or overﬂow. Imagine, for example, a case where all the elements with even indices were numbers with very large absolu...
View Full Document
- Spring '10
- The American