# US 2014/0156979 A1 · Performance in Predicting Branches

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

- Number: US 2014/0156979 A1
- Document ID: US20140156979A1
- Status: Published application
- Kind: A1
- Application number: 14/174,966
- Filed: 2014-02-07
- Published: 2014-06-05
- Earliest claimed: 2011-05-26
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Wen-Tzer T. Chen; Diane G. Flemming; William A. Maron; Mysore Sathyanarayana Srinivas; David Blair Whitworth
- Web page: https://patentgrep.com/patent/US20140156979A1

## CPC

- G06F 9/3844: {using dynamic branch prediction, e.g. using branch history tables}
- G06F 9/38: Concurrent instruction execution, e.g. pipeline or look ahead
- G06F 9/3806: {using address prediction, e.g. return stack, branch history buffer}
- G06F 9/3848: {using hybrid branch prediction, e.g. selection between prediction techniques}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method for processing instructions. The instructions are processed by a processor unit while using a first table in a plurality of tables to predict a set of instructions needed by the processor unit after processing of a conditional instruction. An identification is formed that a rate of success in correctly predicting the set of instructions when using the first table is less than a threshold number. A sequence of the instructions being processed by the processor unit is searched for an instruction that matches a marker in a set of markers for identifying when to use the plurality of tables. An identification that the instruction that matches the marker is formed. A second table from the plurality of tables referenced by the marker is identified. The second table is used in place of the first table.

## Claims

### Claim 1

A method for processing instructions, the method comprising:
processing the instructions by a processor unit while using a first table in a plurality of tables to predict a set of instructions needed by the processor unit after processing of a conditional instruction;
responsive to identifying that a rate of success in correctly predicting the set of instructions when using the first table is less than a threshold number, searching a sequence of the instructions being processed by the processor unit for an instruction that matches a marker in a set of markers for identifying when to use the plurality of tables;
responsive to identifying the instruction that matches the marker, identifying a second table from the plurality of tables referenced by the marker; and
using the second table in place of the first table.

### Claim 2 (depends on 1)

The method of claim 1 further comprising:
using the second table to predict the set of instructions needed by the processor unit after processing of the instruction that matches the marker.

### Claim 3 (depends on 1)

The method of claim 1 further comprising:
identifying an order that the instructions would be processed by the processor unit during a simulation of a program;
identifying a first instruction in the order where a first rate of success in predicting a next instruction needed by the processor unit after a first conditional instruction was less than a first threshold number; and
responsive to identifying the first instruction, storing information about a first set of instructions appearing in the order after a second conditional instruction into the second table, storing an instruction identifier for the first instruction as the marker in a primary table, and storing a table identifier for the second table in association with the marker in the primary table.

### Claim 4 (depends on 3)

The method of claim 3 further comprising:
responsive to identifying the first instruction, identifying a second instruction where the first rate of success was greater than or equal to a second threshold number; and
responsive to identifying the second instruction, beginning the storing of the information about the first set of instructions appearing in the order after the second conditional instruction into the second table.

### Claim 5 (depends on 3)

The method of claim 3 further comprising:
responsive to identifying a third instruction in the order where the first rate of success was less than the first threshold number, completing the storing of the information into the second table; and
responsive to identifying a fourth instruction where the first rate of success was greater than or equal to a second threshold number, starting a third table referenced by a second marker in the primary table.

### Claim 6 (depends on 5)

The method of claim 5 further comprising:
identifying a phase of the program as the instructions appearing in the order after the first instruction and including the third instruction; and
using the second table during processing of the phase of the program.

### Claim 7 (depends on 1)

The method of claim 1 further comprising:
creating a primary table having a set of table identifiers and a set of instruction identifiers, wherein the set of instruction identifiers identify instructions that mark a start of different phases of a program; and
using tables identified by the set of table identifiers during the different phases of the program.

### Claim 8 (depends on 1)

The method of claim 1, wherein the first table is a branch history table comprising a record of instances that a set of branches was one of taken and not taken following execution of a set of conditional instructions.
