Patent US3517241A successfully refreshed from Google Patents.
Patent FR1361396A successfully refreshed from Google Patents.
Patent US5933628A successfully refreshed from Google Patents.
← Back to Patent Explorer
US5933628A Expired / Lapsed US ⏱️ 0.0 years remaining

Method for identifying hard-to-predict branches to enhance processor performance

Assignee: Idea Corp USA
•
Filing: 1997-11-28
•
Granted: 1999-08-03
•
Expires: 2017-11-28
📄 Original PDF 🌐 Google Patents 🔄 Sync Now

Abstract

Abstract A method and apparatus for handling branch instructions contained within a source program includes applying a set of heuristics to classify each of the branch instructions in the source program as either a hard-to-predict type or a simple type of branch. A system implements a multi-heuristic branch predictor comprising a large, relatively simple branch predictor having many entries, to accommodate the majority of branch instructions encountered in a program, and a second, relatively small, sophisticated branch predictor having a few entries. The sophisticated branch predictor predicts the target addresses of the hard-to-predict branches. By mapping hard-to-predict branches to the sophisticated branch predictor, and easy-to-predict branches to the relatively simple branch predictor, overall performance is enhanced.

Inventors

  • 👤 Po-Hua Chang

Bibliographic Details

Application Number —
Jurisdiction US
Data Source google_patents
Last Synchronized 2026-11-07 15:52
CPC Classifications
G; G06; G06F; G06F8/00; G06F8/40; G06F8/41; G06F8/44; G06F8/447; G06F8/445; G06F8/4451; G06F9/00; G06F9/06; G06F9/30; G06F9/30003; G06F9/30072; G06F9/38; G06F9/3836; G06F9/3842; G06F9/3848

Claims Analysis

Total Claims: 19
Claim 1
Independent Claim 98 words
A method of handling branches comprising the steps of: (a) inputting a source program having one or more branch instructions to a compiler; (b) compiling the source program to produce a machine-executable code therefrom, with a set of heuristics being applied to classify each of the one or more branch instructions inputting as a hard-to-predict type or a simple type of branch, the set of heuristics including identification of a conditional expression that specifies an array element access or a pointer reference; (c) running the machine-executable code on a processor that includes first and second branch predictor circuits.
Claim 2
Independent Claim 98 words
A method of handling branches comprising the steps of: (a) inputting a source program having one or more branch instructions to a compiler; (b) compiling the source program to produce a machine-executable code therefrom, with a set of heuristics being applied to classify each of the one or more branch instructions inputting as a hard-to-predict type or a simple type of branch, the set of heuristics including identification of a conditional expression that specifies an array element access or a pointer reference; (c) running the machine-executable code on a processor that includes first and second branch predictor circuits.
Claim 3
Dependent Claim 47 words
The method according to claim 1 further comprising the step, before step (c), of: marking in the machine-executable code each of the one or more branch instructions that satisfy the set of heuristics with a bit that identifies the branch instruction as the hard-to-predict type of branch.
Claim 4
Dependent Claim 32 words
The method of claim 1 wherein step (c) comprises the step of: predicting a target address of the branch instruction of the hard-to-predict type of branch using the first branch predictor circuit.
Claim 5
Dependent Claim 33 words
The method according to claim 1 wherein step (c) comprises the step of: predicting the target address of the branch instruction of the simple type of branch using the second branch predictor circuit.
Claim 6
Dependent Claim 33 words
The method according to claim 1 wherein the set of heuristics further includes a loop that traverses a linked data structure, or a loop that iterates more than a predetermined number of times.
Claim 7
Dependent Claim 16 words
The method according to claim 5 wherein the predetermined number of times is greater than 8.
Claim 8
Independent Claim 117 words
A method of handling branch instructions comprising the steps of: (a) compiling a source program that includes first and second branch instructions to produce an intermediate code; (b) applying a set of heuristics to the intermediate code that classifies the first branch instruction as a hard-to-predict type, and the second branch instruction as a simple type; (c) generating machine-executable code from the intermediate code, the machine-executable code including information which identifies the first branch instruction as the hard-to-predict type, the machine-executable code converting the first branch instruction into predicated execution code; (d) running the machine-executable code on a processor that includes first and second branch predictors which respectively operate on the hard-to-predict and simple type branch instructions.
Claim 9
Independent Claim 117 words
A method of handling branch instructions comprising the steps of: (a) compiling a source program that includes first and second branch instructions to produce an intermediate code; (b) applying a set of heuristics to the intermediate code that classifies the first branch instruction as a hard-to-predict type, and the second branch instruction as a simple type; (c) generating machine-executable code from the intermediate code, the machine-executable code including information which identifies the first branch instruction as the hard-to-predict type, the machine-executable code converting the first branch instruction into predicated execution code; (d) running the machine-executable code on a processor that includes first and second branch predictors which respectively operate on the hard-to-predict and simple type branch instructions.
Claim 10
Dependent Claim 43 words
The method according to claim 7 wherein the processor includes first and second branch predictors which respectively operate on the hard-to-predict and simple type branch instructions, and the information that identifies the first branch instruction as the hard-to-predict type comprises a hint bit.
Claim 11
Dependent Claim 25 words
The method according to claim 8 wherein the first branch predictor predicts a target address of the first branch instruction responsive to the hint bit.
Claim 12
Independent Claim 141 words
A system for handling branch instructions of a computer program comprising: a compiler that generates a machine-executable code from a source code listing of the computer program, the compiler including an algorithm that classifies a branch instruction as a hard-to-predict type of branch instruction according to one or more heuristics, the hard-to-predict type of branch instruction having an associated hint bit that is set by the compiler, the one or more heuristics including identification of a conditional expression that specifies an array element access or a pointer reference; a processor that executes the machine-executable code generated by the compiler, the processor including first and second branch predictor circuits that predict target addresses of the branch instructions, wherein the hint bit determines which of the first or second branch predictor circuits is utilized for a particular branch instruction of the machine-executable code.
Claim 13
Independent Claim 141 words
A system for handling branch instructions of a computer program comprising: a compiler that generates a machine-executable code from a source code listing of the computer program, the compiler including an algorithm that classifies a branch instruction as a hard-to-predict type of branch instruction according to one or more heuristics, the hard-to-predict type of branch instruction having an associated hint bit that is set by the compiler, the one or more heuristics including identification of a conditional expression that specifies an array element access or a pointer reference; a processor that executes the machine-executable code generated by the compiler, the processor including first and second branch predictor circuits that predict target addresses of the branch instructions, wherein the hint bit determines which of the first or second branch predictor circuits is utilized for a particular branch instruction of the machine-executable code.
Claim 14
Dependent Claim 35 words
The system of claim 10 wherein the one or more heuristics further includes identification of a loop that traverses a linked data structure or a loop that iterates more than a predetermined number of times.
Claim 15
Dependent Claim 15 words
The system of claim 11 wherein the predetermined number of times is greater than 8.
Claim 16
Independent Claim 194 words
A system for handling branch instructions of a computer program comprising: a compiler having a front-end that processes the source code listing and produces a high-level intermediate code that contains semantic information therefrom, an algorithm that operates on the high-level intermediate code to classify a branch instruction as a hard-to-predict type of branch instruction according to one or more heuristics, the one or more heuristics including identification of a conditional expression that specifies an array element access or a pointer reference, an optimizer that converts the high-level intermediate code operated upon by the algorithm into a low-level intermediate code, a portion of the hard-to-predict type of branch instructions being converted into predicate execution code, a code generator that generates a machine-executable code from the optimized low-level intermediate code, a remaining portion of the hard-to-predict branch instructions being marked with a hint bit; a processor that executes the machine-executable code generated by the compiler, the processor including first and second branch predictors that predict a target address of the branch instructions wherein the hint bit determines which of the first or second branch predictors is utilized for a particular branch instruction of the machine-executable code.
Claim 17
Independent Claim 194 words
A system for handling branch instructions of a computer program comprising: a compiler having a front-end that processes the source code listing and produces a high-level intermediate code that contains semantic information therefrom, an algorithm that operates on the high-level intermediate code to classify a branch instruction as a hard-to-predict type of branch instruction according to one or more heuristics, the one or more heuristics including identification of a conditional expression that specifies an array element access or a pointer reference, an optimizer that converts the high-level intermediate code operated upon by the algorithm into a low-level intermediate code, a portion of the hard-to-predict type of branch instructions being converted into predicate execution code, a code generator that generates a machine-executable code from the optimized low-level intermediate code, a remaining portion of the hard-to-predict branch instructions being marked with a hint bit; a processor that executes the machine-executable code generated by the compiler, the processor including first and second branch predictors that predict a target address of the branch instructions wherein the hint bit determines which of the first or second branch predictors is utilized for a particular branch instruction of the machine-executable code.
Claim 18
Dependent Claim 33 words
The system of claim 13 wherein the one or more heuristics further includes a loop that traverses a linked data structure or a loop that iterates more than a predetermined number of times.
Claim 19
Dependent Claim 15 words
The system of claim 14 wherein the predetermined number of times is greater than 8.

USPTO Annuity & Maintenance Windows

Annuity Stage Window Opens Payment Deadline Surcharge Period Until Estimated Fee Status
3.5 Years (Year 4) 2002-08-02 2003-02-01 2003-08-03 $2000.00 Window Closed / Lapsed
7.5 Years (Year 8) 2006-08-02 2007-02-01 2007-08-03 $3760.00 Window Closed / Lapsed
11.5 Years (Year 12) 2010-08-02 2011-02-01 2011-08-03 $7700.00 Window Closed / Lapsed

Assigned Categories & Tags

No categories assigned to this patent yet.

Assign Category Tag