l7-handout

l7-handout - Lecture 7 Instruction Scheduling I. Basic...

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

View Full Document Right Arrow Icon
1 Carnegie Mellon Lecture 7 Instruction Scheduling I. Basic Block Scheduling II. Global Scheduling (for Non-Numeric Code) Reading: Chapter 10.3 – 10.4 M. Lam CS243: Instruction Scheduling 1 Carnegie Mellon Scheduling Constraints Data dependences The operations must generate the same results as the corresponding ones in the original program. Control dependences All the operations executed in the original program must be executed in the optimized program Resource constraints No over-subscription of resources. M. Lam CS243: Instruction Scheduling 2
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 Carnegie Mellon Data Dependence Must maintain order of accesses to potentially same locations True dependence : write -> read ( RAW hazard) a = = a Output dependence : write -> write ( WAW hazard) a = a = Anti -dependence : read -> write ( WAR hazard) = a a = Data Dependence Graph Nodes : operations Edges : n 1 -> n 2 if n 2 is data dependent on n 1 labeled by the execution length of n 1 M. Lam CS243: Instruction Scheduling 3 Carnegie Mellon Analysis on Memory Variables Undecidable in general r e a d x r e a d y A [ x ] = = A [ y ] Two memory accesses can potentially be the same unless proven otherwise Classes of analysis: simple : base+offset1 = base+offset2 ? data dependence analysis ”: Array accesses whose indices are affine expressions of loop indices A[2i] = A[2i+1] ?
Background image of page 2
3 Carnegie Mellon Resource Constraints Each instruction type has a resource reservation table Pipelined functional units: occupy only one slot Non-pipelined
Background image of page 3

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

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

Page1 / 10

l7-handout - Lecture 7 Instruction Scheduling I. Basic...

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

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