ilp1 - What is ILP? Instruction Instruction Level...

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

View Full Document Right Arrow Icon
struction Level arallelism (ILP) Instruction Level Parallelism (ILP) or Declaration of Independence CSE 240A Dean Tullsen What is ILP? The characteristic of a program that certain instructions are independent , and can potentially be executed in parallel . Any mechanism that creates, identifies, or exploits the dependence of instructions, allowing them to be executed independence of instructions, allowing them to be executed in parallel. Why do we want/need ILP? – In a superscalar architecture? hat about a scalar architecture? What about a scalar architecture? CSE 240A Dean Tullsen Where do we find ILP? In basic blocks? – 15-20% of (dynamic) instructions are branches in typical code Across basic blocks? ow? how? for (i=1; i<=1000; i++) x[i] = x[i] * s CSE 240A Dean Tullsen How do we expose ILP? by moving instructions around. How?? software ardware hardware CSE 240A Dean Tullsen
Background image of page 1

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

View Full DocumentRight Arrow Icon
Exposing ILP in software instruction scheduling (changes ILP within a basic block) loop unrolling (allows ILP across iterations by putting instructions from multiple iterations in the same basic lock) block) Others (trace scheduling, software pipelining) we’ll talk about later… CSE 240A Dean Tullsen A sample loop Loop: LD F0,0(R1) ;F0=array element, R1=X[] ULD 4 F0 F2 ultiply scalar in F2 MULD F4,F0,F2 ;multiply scalar in F2 SD F4, 0(R1) ;store result ADDI R1,R1,8 ;increment pointer 8B (DW) EQ 3 R1 R2 2 = &X[1001] SEQ R3, R1, R2 ;R2 = &X[1001] BNEZ R3,Loop ;branch R3!=zero NOP ;delayed branch slot Where are the dependencies and stalls? Operation Latency (stalls) FP Mult 6 (5) LD 2 (1) Int ALU 1 (0) CSE 240A Dean Tullsen Instruction Scheduling Loop: LD F0,0(R1) ULD 4 F0 F2 Loop: LD F0,0(R1) DDI 1 R1 8 MULD F4,F0,F2 SD 0(R1),F4 ADDI R1,R1,8 EQ 3 R1 R2 ADDI R1,R1,8 MULD F4,F0,F2 SEQ R3, R1, R2 NEZ 3 Loop SEQ R3, R1, R2 BNEZ R3,Loop NOP BNEZ R3,Loop SD -8 (R1),F4 CSE 240A Dean Tullsen Loop Unrolling Loop: LD F0,0(R1) DDI 1 R1 8 Loop: LD F0,0(R1) DDI 1 R1 8 ADDI R1,R1,8 MULD F4,F0,F2 SEQ
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 6

ilp1 - What is ILP? Instruction Instruction Level...

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

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