Lec11c - COMP 4300 Computer Architecture Instruction-level...

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 Instruction-level parallelism: Instruction Dependence 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 ILP Challenges How many instructions can we execute in parallel? Definition of Basic instruction block : What is between two branch instructions: Example: Body of a loop. Typical MIPS programs have 15-25 % branch instruction : One every 4-7 instructions is a branch. How many of those are likely to be data dependent on each other? We need the means to exploit parallelism across basic blocks. What stops us from doing so?
Background image of page 2
3 Review: Dependencies Data dependence Name dependencies Control Output dependence Anti-dependence Dependence Compare with hazards
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 Instr J is data dependent on Instr I Instr J tries to read operand before Instr I writes it or Instr J is data dependent on Instr K which is dependent on Instr I Caused by a “ True Dependence ” (compiler term) If true dependence caused a hazard in the pipeline, called a Read After Write (RAW) hazard I: add r1 ,r2,r3 J: sub r4, r1 ,r3 Data Dependence and Hazards How to detect a True Dependence?
Background image of page 4
5 Data Dependences through registers/memory Dependences through registers are easy: lw r10,10(r11) add r12,r10,r8 just compare register names. Dependences through memory are harder: sw r10,4 (r2) ? lw r6,0(r4) is r2+4 = r4+0? If so they are dependent, if not, they are not.
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 Name dependence : when 2 instructions use same register or memory location, called a name , but no flow of data between the instructions associated with that name; 2 versions of name dependence Instr J writes operand before Instr I reads it Called an “ anti-dependence ” by compiler writers. This results from reuse of the name “ r1 If anti-dependence caused a hazard in the pipeline, called a Write After Read (WAR) hazard I: sub r4, r1 ,r3 J: add r1 ,r2,r3 K: mul r6,r1,r7 Name Dependence #1: Anti-dependence
Background image of page 6
7 Name Dependence
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.

This note was uploaded on 12/07/2011 for the course COMP 3400 taught by Professor Staff during the Fall '10 term at Auburn University.

Page1 / 21

Lec11c - COMP 4300 Computer Architecture Instruction-level...

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