A two level branch history table (TLBHT) is substantially improved by
providing a mechanism to prefetch entries from the very large second
level branch history table (L2 BHT) into the active (very fast) first
level branch history table (L1 BHT) before the processor uses them in the
branch prediction process and at the same time prefetch cache misses into
the instruction cache. The mechanism prefetches entries from the very
large L2 BHT into the very fast L1 BHT before the processor uses them in
the branch prediction process. A TLBHT is successful because it can
prefetch branch entries into the L1 BHT sufficiently ahead of the time
the entry is needed. This feature of the TLBHT is also used to prefetch
instructions into the cache ahead of their use. In fact, the timeliness
of the prefetches produced by the TLBHT can be used to remove most of the
cycle time penalty incurred by cache misses.