We can run experiments to test the branch predication

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: 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 overflow 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 first 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 floating-point multiplication and addition are not associative. Thus, combine5 and combine6 could potentially produce different results due to rounding or overflow. Imagine, for example, a case where all the elements with even indices were numbers with very large absolu...
View Full Document

Ask a homework question - tutors are online