SYSTEM AND METHOD FOR OPTIMIZING BRANCH LOGIC FOR HANDLING HARD TO PREDICT INDIRECT BRANCHES
Patent №
US 7,809,933
Granted
2010-10-05
Filed 2007
Owner
INTERNATIONAL BUSINESS MACHINES CORPORATION
Lab
AI components
1
hardware
Assignment
Recorded
Dataset
AIPD
2023_r1 edition
Application
11759350
A system and method for optimizing the branch logic of a processor to improve handling of hard to predict indirect branches are provided. The system and method leverage the observation that there will generally be only one move to the count register (mtctr) instruction that will be executed while a branch on count register (bcctr) instruction has been fetched and not executed. With the mechanisms of the illustrative embodiments, fetch logic detects that it has encountered a bcctr instruction that is hard to predict and, in response to this detection, blocks the target fetch from entering the instruction buffer of the processor. At this point, the fetch logic has fetched all the instructions up to and including the bcctr instruction but no target instructions. When the next mtctr instruction is executed, the branch logic of the processor grabs the data and starts fetching using that target address. Since there are no other target instructions that were fetched, no flush is needed if that target address is the correct address, i.e. the branch prediction is correct.
AI classification
Ownership
INTERNATIONAL BUSINESS MACHINES CORPORATION
assignment · 194940866
Assignors
LEVITAN, DAVID S, SAUER, WOLFRAM
On an employer assignment, the assignors are typically the inventors.