← Back to Patent Explorer
EP0442624A2 Expired / Lapsed EP ⏱️ 0.0 years remaining

Partitioning case statements for optimal execution

Assignee: International Business Machines Corp
•
Filing: 1991-01-23
•
Granted: —
•
Expires: 2011-01-23
📄 Original PDF 🌐 Google Patents 🔄 Sync Now

Abstract

Abstract This invention permits an optimising compiler to select optimal instruction sequences for handling the source level multi-way branch, commonly known as the case or switch statement. A costing heuristic is established, based on machine specific information, which weights the relative performance of instruction sequences used to perform statement selection from several available selection methods. The constants, which form the basis of the selection criteria, are then clustered into sets. This clustering is controlled by the costing heuristic. The resulting sets represent clusters of values for which a particular selection method is most appropriate. The invention is preferably implemented at the intermediate code level, and with appropriate preselection of parameters by the compiler builder, allows the invention to be used on any type of target machine. The use of the invention results in faster compilation and execution.

Inventors

  • 👤 Steven Murray Hoxey

Bibliographic Details

Application Number —
Jurisdiction EP
Data Source google_patents
Last Synchronized 2026-11-02 07:03
CPC Classifications
G; G06; G06F; G06F8/00; G06F8/40; G06F8/41; G06F8/44; G06F8/443

Claims Analysis

Total Claims: 6
Claim 1
Independent Claim 64 words
A method of optimising a program to be compiled in a computer, said method comprising the steps of: (a) selecting a multi-way branch statement; (b) determining the relative costs of a plurality of instruction sequences to implement said multi-way branch statement; (c) selecting an instruction sequence from said plurality of instruction sequences that carries the least cost; and (d) implementing said least-cost instruction sequence.
Claim 2
Dependent Claim 25 words
A method as claimed in Claim 1, in which said plurality of instruction sequences comprises range test, jump table, compare-and-branch, arithmetic progression and address translation.
Claim 3
Dependent Claim 24 words
A method as claimed in Claim 1 or Claim 2, in which said costs include cost of machine time required to execute said program.
Claim 4
Dependent Claim 32 words
A method as claimed in Claim 1, 2 OR 3, further comprising setting a plurality of selection values according to parameters determined by the source text of said program to be compiled.
Claim 5
Dependent Claim 43 words
A method as claimed in Claim 1, 2, 3 or 4 in which said determination of cost is made by inserting values in a costing heuristic, and further comprising setting said values in said costing heuristic according to the architecture of said computer.
Claim 6
Dependent Claim 29 words
A method as claimed in either of Claim 5 further comprising the step of clustering said constants into sets from which said costing heuristic selects said lowest-cost instruction sequence.

References Cited (Backward Citations)

No citation records indexed.

USPTO Annuity & Maintenance Windows

Maintenance schedule is calculated for granted US utility patents.

Assigned Categories & Tags

No categories assigned to this patent yet.

Assign Category Tag