A computer program product determines whether a loop has a high usage
count. If the computer program product determines the loop has a high
usage count, the computer program product determines whether the loop has
an irregularly accessed load. If the loop has an irregularly accessed
load, the computer program product inserts pattern recognition code to
calculate whether successive iterations of the irregular memory load in
the loop have a predictable access pattern. The computer program product
implants conditional adaptive prefetch code including a prefetch
instruction into the output code.