1. A method for prefetching data and/or instructions from a main memory to a secondary memory, the method comprising: generating control flow information, comprising storing respective information for each retired instruction of one or more retired instructions; storing a plurality of addresses, wherein for each retired instruction of one or more retired instructions that incur one or more secondary memory misses, storing the plurality of addresses comprises: storing respective one or more addresses for the retired instruction, wherein the respective one or more addresses correspond respectively to the one or more secondary memory misses; wherein storing the respective one or more addresses comprises storing the respective one or more addresses to an entry in a table by using an index for the entry, wherein determining the index for the entry involves using an address for an older retired instruction that incurred one or more secondary memory misses and control flow information for the older retired instruction; for each incurred secondary memory miss, performing a prefetch operation according to: a respective address corresponding to the incurred secondary memory miss; the control flow information; and the plurality of addresses.