



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The concept of dependence distances in computer microarchitecture, including control dependences, memory dependences, and source operand usage. It also covers methods for calculating dependence distances and the impact of processor capabilities on these distances.
Typology: Study notes
1 / 7
This page cannot be seen from the preview
Don't miss anything!




UIUC ECE 411 and NTU CA 718-Q: Computer Microarchitecture: Hardware and Software© 1999, Wen-mei W. Hwu, All Rights Reserved. IMPACT
UIUC ECE 411 and NTU CA 718-Q: Computer Microarchitecture: Hardware and Software© 1999, Wen-mei W. Hwu, All Rights Reserved. IMPACT
UIUC ECE 411 and NTU CA 718-Q: Computer Microarchitecture: Hardware and Software© 1999, Wen-mei W. Hwu, All Rights Reserved. IMPACT
3
–Prevent lost opportunities
r1<- mem [r2+0]
r3<- r1 + r
r1<- r1 + r
UIUC ECE 411 and NTU CA 718-Q: Computer Microarchitecture: Hardware and Software© 1999, Wen-mei W. Hwu, All Rights Reserved. IMPACT
4
–Reflect other constraints on reordering
–Dependences to prevent branch reordering
5
–Dependences to prevent operations from moving above branches
–Dependences to prevent dependent or ambiguous memory ops from reordering (store-load, store-store dependences)
–Can mislead scheduling heuristics that use dependence height (next slide)
6
–If can only issue one branch per cycle, then give dependences between branches a distance of one cycle
UIUC ECE 411 and NTU CA 718-Q: Computer Microarchitecture: Hardware and Software© 1999, Wen-mei W. Hwu, All Rights Reserved. IMPACT
Dependence Distances (cont.)
–If nothing can issue after a branch, then give dependences to operations held below branch a distance of 1
–If store ties up memory for 2 cycles, then give store-load and store-store control dependences a distance of 2 UIUC ECE 411 and NTU CA 718-Q: Computer Microarchitecture: Hardware and Software© 1999, Wen-mei W. Hwu, All Rights Reserved. IMPACT
Dependence Distances (cont.)
–List operation latency (register flow distance) of each opcode
–List distance for other type of dependences
UIUC ECE 411 and NTU CA 718-Q: Computer Microarchitecture: Hardware and Software© 1999, Wen-mei W. Hwu, All Rights Reserved. IMPACT
9
Dependence Distance (cont.)
–Distance may also depend on the operands of the operation
UIUC ECE 411 and NTU CA 718-Q: Computer Microarchitecture: Hardware and Software© 1999, Wen-mei W. Hwu, All Rights Reserved. IMPACT
10
Dependence Distance (cont.)
–Distance may also depend on which operation is using the result
11
Operand Usage Approach
OL_shft (dest(2) src(0 0) br_dest(0) br_src(0))
OL_cbr ( src(0 0 0) br_dest(1) br_src(0))
OL_st ( src(-1 -1 1) br_dest(1) br_src(0) mem_dest(2) mem_src(0))
12
Operand Usage Approach
–Physical destinations (to set register dependence distances)
UIUC ECE 411 and NTU CA 718-Q: Computer Microarchitecture: Hardware and Software© 1999, Wen-mei W. Hwu, All Rights Reserved. IMPACT
Processor’s Capability
–Target a particular style of processor implementation
–Machine model commonly hard coded into the scheduler/simulator
UIUC ECE 411 and NTU CA 718-Q: Computer Microarchitecture: Hardware and Software© 1999, Wen-mei W. Hwu, All Rights Reserved. IMPACT
Processor’s Capabilities
UIUC ECE 411 and NTU CA 718-Q: Computer Microarchitecture: Hardware and Software© 1999, Wen-mei W. Hwu, All Rights Reserved. IMPACT
21
Processor’s Capabilities
–Difficult to precisely reflect large implementation changes
UIUC ECE 411 and NTU CA 718-Q: Computer Microarchitecture: Hardware and Software© 1999, Wen-mei W. Hwu, All Rights Reserved. IMPACT
22
Processor’s Capabilities
–Enumerate the relevant processor resources:
23
Processor’s Capabilities
24 Reservation Tables
Decoder Read Port Ialu 1 2 3 1 2 3 4 1 2
Cycle
Wr Pt
UIUC ECE 411 and NTU CA 718-Q: Computer Microarchitecture: Hardware and Software© 1999, Wen-mei W. Hwu, All Rights Reserved. IMPACT
Reservation Tables
–Table of which resources are used and at what times
–Fix usage times relative to some point in operation execution
–For example, one table for a RISC Ialu op with one register source: UIUC ECE 411 and NTU CA 718-Q: Computer Microarchitecture: Hardware and Software© 1999, Wen-mei W. Hwu, All Rights Reserved. IMPACT
Reservation Tables
–Use processor resource information to create a resource usage table
UIUC ECE 411 and NTU CA 718-Q: Computer Microarchitecture: Hardware and Software© 1999, Wen-mei W. Hwu, All Rights Reserved. IMPACT
27
Reservation Tables
–Operation can be scheduled if...
28
Reservation Tables
operation can use resources
–For example, that Ialu op with one register src might be:
29
Reservation Tables
–Enumeration solution: enumerate all of the reservation table variations
30
Reservation Tables
–Counter-based solution: use counters for interchangeable resources
UIUC ECE 411 and NTU CA 718-Q: Computer Microarchitecture: Hardware and Software© 1999, Wen-mei W. Hwu, All Rights Reserved. IMPACT
Operand Effects
–Sign bit in branch target can affect branch behavior
–Literal width can affect grouping logic constraints
–Number of literals can affect grouping logic constraints
UIUC ECE 411 and NTU CA 718-Q: Computer Microarchitecture: Hardware and Software© 1999, Wen-mei W. Hwu, All Rights Reserved. IMPACT
Operand Effects
to capture relevant operand information
–Adds complexity to rest of compiler
–Relevant operand info can change with each implementation
UIUC ECE 411 and NTU CA 718-Q: Computer Microarchitecture: Hardware and Software© 1999, Wen-mei W. Hwu, All Rights Reserved. IMPACT
39
Operand Effects (cont.)
operation formats separately
–Specify what each operand may be for each format