Lec12b - COMP 4300 Computer Architecture Review Control...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
1 COMP 4300 Computer Architecture Review: Control Dependencies Dr. Xiao Qin Auburn University http://www.eng.auburn.edu/~xqin [email protected] Fall, 2010
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Review: Preserving the data flow Consider the following example: daddu r1,r2,r3 beqz r4,L dsubu r1,r5,r6 L: … or r7,r1,r8 What can you say about the value of r1 used by the or instruction?
Background image of page 2
3 Preserving the data flow Corollary: Preserving data dependences alone is not sufficient when changing program order. We must preserve the data flow. Data flow : actual flow of data values among instructions that produce results and those that consume them. These two principles together allow us to execute instructions in a different order and still maintain the program semantics . This is the foundation upon which ILP processors are built.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 Speculation DADDU R1, R2, R3 BEQZ R12, skipnext DSUBU R4, R5, R6 DADDU R5, R4, R9 skipnext OR R7, R8, R9 Assume R4 is dead (rather than live) after skipnext. Can we execute DSUBU before BEQZ? This type of code scheduling is called speculation. The compiler is betting on the branch outcome. In this case, the bet is that the branch is usually not take. R4 could not generate an exception. The data flow cannot be affected.
Background image of page 4
5 Summary Two critical properties to maintain program correctness: 1. Any changes in the ordering of instructions should not change how exceptions are raised in a program. 2. The data flow is preserved.
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
6 COMP 4300 Computer Architecture Scoreboard Dr. Xiao Qin Auburn University http://www.eng.auburn.edu/~xqin [email protected] Fall, 2010
Background image of page 6
7 Static Scheduling Compiler techniques for scheduling - separate dependent instructions - minimize the number of hazard and stalls e.g.: static branch prediction Dynamic Scheduling HW Scheme: Dynamic Scheduling 1. Uses hardware to rearrange instructions to reduce stalls
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 17

Lec12b - COMP 4300 Computer Architecture Review Control...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online