{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

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

View Full Document Right Arrow Icon
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
Background image of page 1

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

View Full Document Right Arrow Icon
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 2
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
Background image of page 3

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

View Full Document Right Arrow Icon
Analysis on Memory Variables Undecidable in general read x read 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
Background image of page 4
Resource Constraints Each instruction type has a resource reservation table Pipelined functional units: occupy only one slot Non-pipelined functional units:
Background image of page 5

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

View Full Document Right Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}