# US 2009/0271597 A1 · Branch Prediction In A Computer Processor

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2009/0271597 A1
- Document ID: US20090271597A1
- Status: Published application
- Kind: A1
- Application number: 12/108,846
- Filed: 2008-04-24
- Published: 2009-10-29
- Earliest claimed: 2008-04-24
- Assignees: International Business Machines Corporations
- Inventors: Jamie R. Kuesel; Mark G. Kupferschmidt; Eric O. Mejdrich; Paul E. Schardt
- Web page: https://patentgrep.com/patent/US20090271597A1

## CPC

- G06F 9/3844: {using dynamic branch prediction, e.g. using branch history tables}
- G06F 9/30145: {Instruction analysis, e.g. decoding, instruction word fields}
- G06F 9/322: {for non-sequential address}
- G06F 9/3806: {using address prediction, e.g. return stack, branch history buffer}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Methods, apparatus, and products for branch prediction in a computer processor are disclosed that include: recording for a sequence of occurrences of a branch, in an algorithm in which the branch occurs more than once, each result of the branch, including maintaining a pointer to a location of a most recently recorded result; resetting the pointer to a location of the first recorded result upon completion of the algorithm; and predicting subsequent results of the branch, in subsequent occurrences of the branch, in dependence upon the recorded results.

## Claims

### Claim 1

A method of branch prediction in a computer processor, the method comprising:
recording for a sequence of occurrences of a branch, in an algorithm in which the branch occurs more than once, each result of the branch, including maintaining a pointer to a location of a most recently recorded result;
resetting the pointer to a location of the first recorded result upon completion of the algorithm; and
predicting subsequent results of the branch, in subsequent occurrences of the branch, in dependence upon the recorded results.

### Claim 2 (depends on 1)

The method of claim 1 wherein recording each result of the branch further comprises:
recording each result of the branch responsive to an operation code indicating that the branch is recordable.

### Claim 3 (depends on 1)

The method of claim 1 wherein resetting the pointer further comprises:
resetting the pointer responsive to an operation code representing an instruction to reset the pointer and providing as a parameter of the instruction an identifier of the branch.

### Claim 4 (depends on 1)

The method of claim 1 wherein predicting subsequent results of the branch further comprises:
incrementing the pointer on each occurrence of the branch; and
using, for branch prediction on each occurrence of the branch, the recorded result identified by a current value of the pointer.

### Claim 5 (depends on 1)

The method of claim 1 further comprising:
determining for each prediction whether the prediction was correct; and
recording, for each incorrect prediction, the result of the branch.

### Claim 6 (depends on 1)

The method of claim 1 wherein the method is implemented on a network on chip (‘NOC’), the NOC comprising integrated processor (‘IP’) blocks, routers, memory communications controllers, and network interface controller, each IP block adapted to a router through a memory communications controller and a network interface controller, each memory communications controller controlling communication between an IP block and memory, and each network interface controller controlling inter-IP block communications through routers.

### Claim 7

An apparatus for branch prediction in a computer processor, the apparatus comprising a computer processor, a computer memory operatively coupled to the computer processor, the computer processor configured to be capable of:
recording for a sequence of occurrences of a branch, in an algorithm in which the branch occurs more than once, each result of the branch, including maintaining a pointer to a location of a most recently recorded result;
resetting the pointer to a location of the first recorded result upon completion of the algorithm; and
predicting subsequent results of the branch, in subsequent occurrences of the branch, in dependence upon the recorded results.

### Claim 8 (depends on 7)

The apparatus of claim 7 wherein recording each result of the branch further comprises:
recording each result of the branch responsive to an operation code indicating that the branch is recordable.

### Claim 9 (depends on 7)

The apparatus of claim 7 wherein resetting the pointer further comprises:
resetting the pointer responsive to an operation code representing an instruction to reset the pointer and providing as a parameter of the instruction an identifier of the branch.

### Claim 10 (depends on 7)

The apparatus of claim 7 wherein predicting subsequent results of the branch further comprises:
incrementing the pointer on each occurrence of the branch; and
using, for branch prediction on each occurrence of the branch, the recorded result identified by a current value of the pointer.

### Claim 11 (depends on 7)

The apparatus of claim 7 wherein the computer processor is further configured to be capable of:
determining for each prediction whether the prediction was correct; and
recording, for each incorrect prediction, the result of the branch.

### Claim 12 (depends on 7)

The apparatus of claim 7 wherein the apparatus is implemented on a network on chip (‘NOC’), the NOC comprising integrated processor (‘IP’) blocks, routers, memory communications controllers, and network interface controller, each IP block adapted to a router through a memory communications controller and a network interface controller, each memory communications controller controlling communication between an IP block and memory, and each network interface controller controlling inter-IP block communications through routers.

### Claim 13

A computer program product for branch prediction in a computer processor, the computer program product disposed in a computer readable, signal bearing medium, the computer program product comprising computer program instructions capable of:
recording for a sequence of occurrences of a branch, in an algorithm in which the branch occurs more than once, each result of the branch, including maintaining a pointer to a location of a most recently recorded result;
resetting the pointer to a location of the first recorded result upon completion of the algorithm; and
predicting subsequent results of the branch, in subsequent occurrences of the branch, in dependence upon the recorded results.

### Claim 14 (depends on 13)

The computer program product of claim 13 wherein recording each result of the branch further comprises:
recording each result of the branch responsive to an operation code indicating that the branch is recordable.

### Claim 15 (depends on 13)

The computer program product of claim 13 wherein resetting the pointer further comprises:
resetting the pointer responsive to an operation code representing an instruction to reset the pointer and providing as a parameter of the instruction an identifier of the branch.

### Claim 16 (depends on 13)

The computer program product of claim 13 wherein predicting subsequent results of the branch further comprises:
incrementing the pointer on each occurrence of the branch; and
using, for branch prediction on each occurrence of the branch, the recorded result identified by a current value of the pointer.

### Claim 17 (depends on 13)

The computer program product of claim 13 further comprising computer program instructions capable of:
determining for each prediction whether the prediction was correct; and
recording, for each incorrect prediction, the result of the branch.

### Claim 18 (depends on 13)

The computer program product of claim 13 wherein the computer program instructions are capable of execution upon a network on chip (‘NOC’), the NOC comprising integrated processor (‘IP’) blocks, routers, memory communications controllers, and network interface controller, each IP block adapted to a router through a memory communications controller and a network interface controller, each memory communications controller controlling communication between an IP block and memory, and each network interface controller controlling inter-IP block communications through routers.

### Claim 19 (depends on 13)

The computer program product of claim 13 wherein the signal bearing medium comprises a recordable medium.

### Claim 20 (depends on 13)

The computer program product of claim 13 wherein the signal bearing medium comprises a transmission medium.
