Advanced Computer Architecture, Imperial College 2001
30
More applns of prediction - data prefetching
•Suppose processor has recently issued loads to addresses a1, a2, .. an
•Hardware data prefetch unit monitors sequence and calculates
1.What the value of an+1 is most likely to be
2.Whether this is known with sufficient confidence
•If so, initiates speculative load
–If a1, a2, .. an have fixed stride, prediction is easy
–Typical programs access several different arrays with different strides/patterns
•Issues:
–Could compiler do better?
–Bad decision could make performance worse (how?)
•