lec12 - LECTURE - 12 ILP: Recall Improving ILP == reducing...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

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

Unformatted text preview: LECTURE - 12 ILP: Recall Improving ILP == reducing stalls Loop unrolling enlarges the basic block More parallelism More opportunity for better scheduling Dependences: Data dependence Name dependence Control dependence Handling Control Dependence Control dependence need not be maintained We need to maintain: Exception behaviour – do not caus e new exceptions Data flow – ensur e the right data item is used Speculation and conditional instructions are techniques to get around control dependence Loop Unrolling: a Relook Our example: for(int i = 1000; i >= 1; i = i-1) { x[i] = x[i] + C; // FP } Consider: for(int i = 1000; i >= 1; i = i-1) { A[i-1] = A[i] + C[i]; // S1 B[i-1] = B[i] + A[i-1]; // S2 } S2 is dependent on S1 S1 is dependent on its previous iteration; same case with S2 Loop-carried dependence ==> loop iterations have to be in-order Removing Loop-Carried Dependence Another example: for(int i = 1000; i >= 1; i = i-1) { A[i] = A[i] + B[i]; // S1 B[i-1] = C[i] + D[i]; // S2 } S1 depends on the prior iteration of S2...
View Full Document

This note was uploaded on 07/14/2011 for the course CS 422 taught by Professor Hogakoi during the Spring '10 term at IIT Kanpur.

Page1 / 15

lec12 - LECTURE - 12 ILP: Recall Improving ILP == reducing...

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

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