# L7 - Lecture 7 Instruction Scheduling I Basic Block Scheduling II Global Scheduling(for Non-Numeric Code Reading Chapter 10.3 10.4 Carnegie Mellon

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

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

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

View Full Document
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
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

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

View Full Document
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] ? interprocedural analysis : global = parameter? pointer analysis : pointer1 = pointer2? Data dependence analysis is useful for many other purposes M. Lam CS243: Instruction Scheduling 4
Carnegie Mellon Resource Constraints Each instruction type has a resource reservation table Pipelined functional units: occupy only one slot Non-pipelined

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This document was uploaded on 03/12/2012.

### Page1 / 20

L7 - Lecture 7 Instruction Scheduling I Basic Block Scheduling II Global Scheduling(for Non-Numeric Code Reading Chapter 10.3 10.4 Carnegie Mellon

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

View Full Document
Ask a homework question - tutors are online