0% found this document useful (0 votes)
30 views7 pages

Appendix H: Authors: John Hennessy & David Patterson

Computer Architecture Appendix H

Uploaded by

a.shyam
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views7 pages

Appendix H: Authors: John Hennessy & David Patterson

Computer Architecture Appendix H

Uploaded by

a.shyam
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Appendix H

Authors: John Hennessy & David Patterson

Copyright 2011, Elsevier Inc. All rights Reserved. 1


Figure H.1 A software-pipelined loop chooses instructions from different loop iterations, thus separating
the dependent instructions within one iteration of the original loop. The start-up and finish-up code will
correspond to the portions above and below the software-pipelined iteration.

Copyright 2011, Elsevier Inc. All rights Reserved. 2


Figure H.2 The execution pattern for (a) a software-pipelined loop and (b) an unrolled loop. The shaded areas are the times
when the loop is not running with maximum overlap or parallelism among instructions. This occurs once at the beginning and once
at the end for the software-pipelined loop. For the unrolled loop it occurs m/n times if the loop has a total of m iterations and is
unrolled n times. Each block represents an unroll of n iterations. Increasing the number of unrollings will reduce the start-up and
clean-up overhead. The overhead of one iteration overlaps with the overhead of the next, thereby reducing the impact. The total
area under the polygonal region in each case will be the same, since the total number of operations is just the execution rate
multiplied by the time.

Copyright 2011, Elsevier Inc. All rights Reserved. 3


Figure H.3 A code fragment and the common path shaded with gray. Moving the assignments to B or C requires a more
complex analysis than for straight-line code. In this section we focus on scheduling this code segment efficiently without hardware
assistance. Predication or conditional instructions, which we discuss in the next section, provide another way to schedule this code.

Copyright 2011, Elsevier Inc. All rights Reserved. 4


Figure H.4 This trace is obtained by assuming that the program fragment in Figure H.3 is the inner loop and unwinding it
four times, treating the shaded portion in Figure H.3 as the likely path. The trace exits correspond to jumps off the frequent
path, and the trace entrances correspond to returns to the trace.

Copyright 2011, Elsevier Inc. All rights Reserved. 5


Figure H.5 This superblock results from unrolling the code in Figure H.3 four times and creating a superblock.

Copyright 2011, Elsevier Inc. All rights Reserved. 6


Figure H.11 The performance of four multiple-issue processors for five SPECfp and SPECint benchmarks. The clock rates
of the four processors are Itanium 2 at 1.5 GHz, Pentium 4 Extreme Edition at 3.8 GHz, AMD Athlon 64 at 2.8 GHz, and the IBM
Power5 at 1.9 GHz.

Copyright 2011, Elsevier Inc. All rights Reserved. 7

Common questions

Powered by AI

Software-pipelining is more beneficial than complex hardware support in scenarios where resource constraints or power efficiency are critical, as it relies on carefully scheduled instruction streams to maintain high levels of parallelism and efficiency without the need for hardware-intensive speculative execution or out-of-order execution. It is advantageous in simpler microarchitectures or where the cost of adding sophisticated hardware is prohibitive, making sophisticated code-level optimizations essential for performance improvements .

Clock rates play a crucial role in evaluating processor performance, especially for multiple-issue processors, as they determine the number of cycles available per second, impacting how quickly instructions can be executed. The comparison between processors like Itanium 2 at 1.5 GHz and Pentium 4 Extreme Edition at 3.8 GHz highlights not just clock speed differences but also how efficiently each processor executes instructions per cycle (IPC). High clock speeds do not automatically imply superior performance if the processor architecture efficiently handles more operations per cycle, suggesting a nuanced interpretation of performance metrics .

Software-pipelined loops separate dependent instructions from different iterations of the loop, allowing for greater overlap and parallelism among instructions. This leads to reduced start-up and finish-up overhead because the execution can proceed with overlapping computations from different iterations, thereby utilizing system resources more effectively. In contrast, unrolled loops can suffer performance penalties due to increased overhead when loop iterations are unrolled, especially when m/n does not divide the total iteration count evenly, leading to periods of inefficiency .

Software-based optimization strategies in the context of multiple-issue processor architectures, like those shown in Figures H.11, must adapt to support parallel execution of multiple instructions per cycle. Optimizations must ensure that sufficient instructions are available for execution without data hazards or stalls. This involves advanced scheduling to exploit available execution slots, enhance parallel instruction throughput, and minimize dependencies to match the architecture's ability to issue multiple instructions concurrently .

Moving assignments within a code fragment without hardware assistance involves challenges related to data and control dependencies. The analysis must ensure that instruction reordering does not violate dependencies, leading to incorrect execution results. Additionally, without hardware support to handle conditionals or speculative execution, optimizing these movements while maintaining throughput and minimizing stalls becomes complex, requiring effective use of compiler techniques such as predication to manage flow with conditional instructions .

Predication or conditional instructions enable the execution of alternative instruction paths, thus allowing for more efficient scheduling of code segments by transforming branches into conditionally executed instructions. This reduces the dependency on hardware to manage alternate control flow, minimizing stalls and increasing throughput by executing multiple instructions concurrently when branches would traditionally require a sequential decision .

Trace exits and entrances influence performance by determining how often the processor must alter its path through the code, which can incur performance penalties due to pipeline flushing or cache misses. When the frequent path is well-known, as seen in the trace obtained by assuming it is the inner loop, it allows for optimization strategies like static prediction, reducing the cost associated with unexpected jumps off the predicted frequent path. The commonality of certain trace entries can also be optimized for, allowing for better prefetching and reducing latency .

Creating a superblock from looping code, such as by unrolling loops multiple times, isolates frequently executed paths, thus optimizing for common-case execution. Superblocks enhance instruction-level parallelism by reducing branch occurrences and associating likely paths with contiguous code storage. This provides a performance boost as it allows the compiler to apply aggressive optimizations like instruction reordering, improving cache locality, and laying out the code to minimize branching penalties .

Unrolling a loop affects the total area under the polygonal execution pattern by overlapping the overhead of one iteration with the overhead of the next. This reduces the separate cumulative overhead periods due to start-up or finish-up occurrences inherent in each iteration. The area, which is the product of execution rate and time, remains the same after unrolling despite an altered distribution of execution phases, highlighting that performance gains come from increased operational overlap rather than reduced overall work .

Superblocks enhance instruction-level parallelism by restructuring code into large, branch-free segments that allow aggressive optimizations, unlike traditional loop techniques that are limited by frequent branches that restrict reordering and parallel execution. By focusing on the common execution paths and minimizing branches, superblocks allow compilers to perform more extensive optimizations, such as reordering or merging instructions, thus exploiting potential parallel execution more effectively .

You might also like