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

Analyzing inductive expressions in a multilanguage optimizing compiler

Assignee: Hewlett Packard Development Co LP
•
Filing: 1995-03-06
•
Granted: 1996-11-19
•
Expires: 2015-03-06
📄 Original PDF 🌐 Google Patents 🔄 Sync Now

Abstract

Abstract A compiler framework comprises a generic compiler back end which may be used by a plurality of front ends to generate object code for a target computer system. Each front end scans and parses a source module containing source code for a programming language, and generates an intermediate language representation that describes the source code. The intermediate language representation is input to the generic compiler back end which performs optimization and code generation for a plurality of target computer systems. A plurality of optimizations are performed by the generic compiler back end using induction variables. Induction variables are commonly used in performing optimizations such as loop unrolling. An efficient method for determining a set of induction variables for a programming loop construct uses effect and dependency information. Typically, effect and dependency information is used for another purpose besides detecting induction variables, for example, to validate other code optimizations. The method for determining the set of induction variables reuses this information as a shortcut to determine induction variables.

Inventors

  • 👤 David S. Blickstein

Bibliographic Details

Application Number —
Jurisdiction US
Data Source google_patents
Last Synchronized 2026-11-05 10:35
CPC Classifications
G; G06; G06F; G06F8/00; G06F8/40; G06F8/41; G06F8/43; G06F8/433; G06F8/44; G06F8/443; G06F8/447

Claims Analysis

Total Claims: 11
Claim 1
Independent Claim 372 words
A method executed in a computer system, the method comprising the steps of: generating a flow graph for a source program that is being compiled using a compiler front end which performs syntactic and semantic processing of a programming language, said flow graph comprising tuples, each tuple representing a single expression in said source program, said flow graph being a representation of said source program in an intermediate language; determining, by said compiler front end for each tuple which can have an effect on another tuple and which is included in said flow graph, an effect indicator that represents an effect said each tuple has on said another tuple, said effect indicator being associated with said each tuple; determining, by said compiler front end for each tuple which can have a dependency on another tuple and which is included in said flow graph, a dependency indicator that represents a dependency said each tuple has on said another tuple, said dependency indicator being associated with said each tuple; detecting a programming loop construct in said flow graph, said programming loop construct comprising one or more blocks in said flow graph, each of said blocks corresponding to a portion of said source program and including a sequence of tuples with no entry or exit between a first tuple add a last tuple of said sequence; determining for each of said blocks comprising said programming loop construct, a set of effects by examining effect indicators that are associated with tuples in the sequence included in a corresponding block, each of said set of effects being associated with the corresponding block representing memory locations that may be modified by one of said tuples in said each corresponding block; determining for said programming loop construct a set of induction variable candidates by examining said sets of effect and dependency indicators, said dependency indicators being associated with tuples that are included in said programing loop construct, said set of induction variable candidates including variables whose dependencies are included in said set of candidates and representing memory locations that may be modified by one of said tuples in said programming loop construct; and optimizing said flow graph using a compiler back end and said set of induction variable candidates.
Claim 2
Independent Claim 372 words
A method executed in a computer system, the method comprising the steps of: generating a flow graph for a source program that is being compiled using a compiler front end which performs syntactic and semantic processing of a programming language, said flow graph comprising tuples, each tuple representing a single expression in said source program, said flow graph being a representation of said source program in an intermediate language; determining, by said compiler front end for each tuple which can have an effect on another tuple and which is included in said flow graph, an effect indicator that represents an effect said each tuple has on said another tuple, said effect indicator being associated with said each tuple; determining, by said compiler front end for each tuple which can have a dependency on another tuple and which is included in said flow graph, a dependency indicator that represents a dependency said each tuple has on said another tuple, said dependency indicator being associated with said each tuple; detecting a programming loop construct in said flow graph, said programming loop construct comprising one or more blocks in said flow graph, each of said blocks corresponding to a portion of said source program and including a sequence of tuples with no entry or exit between a first tuple add a last tuple of said sequence; determining for each of said blocks comprising said programming loop construct, a set of effects by examining effect indicators that are associated with tuples in the sequence included in a corresponding block, each of said set of effects being associated with the corresponding block representing memory locations that may be modified by one of said tuples in said each corresponding block; determining for said programming loop construct a set of induction variable candidates by examining said sets of effect and dependency indicators, said dependency indicators being associated with tuples that are included in said programing loop construct, said set of induction variable candidates including variables whose dependencies are included in said set of candidates and representing memory locations that may be modified by one of said tuples in said programming loop construct; and optimizing said flow graph using a compiler back end and said set of induction variable candidates.
Claim 3
Dependent Claim 63 words
The method of claim 1, wherein said optimizing further comprises updating said set of induction variable candidates by examining tuples in said sequence and eliminating a variable from said set of induction variable candidates when said variable does not conform to predetermined rules that define an induction variable; and using said set of induction variable candidates to perform one or more code optimizations.
Claim 4
Dependent Claim 79 words
The method of claim 2, wherein said predetermined rules include basic induction variables, inductive expressions and pseudo-inductive expressions, a basic induction variable being a variable represented as a linear function of said variable, an inductive expression being a reference to another inductive variable or is a linear function of another inductive expression, and a pseudo-induction variable having properties of either an induction variable or an inductive expression for iterations through said programming loop construct other than a first iteration.
Claim 5
Dependent Claim 35 words
The method of claim 2 further comprising using effect indicators and dependency indicators to validate a first code optimization and to perform a second code optimization that affects tuples included in said programming loop construct.
Claim 6
Dependent Claim 31 words
The method of claim 2, wherein said code optimization performed using said set of induction variable candidates is one of common subexpression elimination, strength reduction, variable elimination, vectorization, and loop unrolling.
Claim 7
Dependent Claim 34 words
The method of claim 2 wherein, after executing said updating step by examining each tuple in said sequence, said set of induction variable candidates includes only those variables that conform to said predetermined rules.
Claim 8
Dependent Claim 103 words
The method of claim 1, wherein said compiler back end is a common compiler back end used by a plurality of compiler front ends to perform optimizations and generate object code, said compiler front end is a first compiler front end, said source program is a first source program, and the method further comprises compiling a second source program using a second compiler front end and said compiler back end, said second compiler front end performing syntactic and semantic processing of a second programming language different from said first programming language, said second source program including source statements in said second programming language.
Claim 9
Dependent Claim 428 words
A memory that is used in a computer system for compiling source programs, the memory comprising: means for generating a flow graph for a source program that is being compiled using a compiler front end which performs syntactic and semantic processing of a programming language, said flow graph comprising tuples, each tuple representing a single expression in said source program, said flow graph being a representation of said source program in an intermediate language; first determining means for determining, by said compiler front end for each tuple which can have an effect on another tuple and which is included in said flow graph, an effect indicator that represents an effect said each tuple has on said another tuple, said effect indicator being associated with said each tuple; second determining means for determining, by said compiler front end for each tuple which can have a dependency on another tuple and which is included in said flow graph, a dependency indicator that represents a dependency said each tuple has on said another tuple, said dependency indicator being associated with said each tuple; means for detecting a programming loop construct in said flow graph, said programming loop construct comprising one or more blocks in said flow graph, each of said blocks corresponding to a portion of said source program and including a sequence of tuples with no entry or exit between a first tuple and a last tuple of said sequence; third determining means, coupled to said detecting means and said first determining means, for determining a set of effects for each of said blocks comprising said programming loop construct by examining effect indicators that are associated with tuples in the sequence included in a corresponding block, each of said set of effects being associated with the corresponding block representing memory locations that may be modified by one of said tuples in said each corresponding block; fourth determining means, coupled to said third determining means and said second determining means, for determining a set of induction variable candidates for said programming loop construct by examining said sets of effects and dependency indicators, said dependency indicators being associated with tuples that are included in said programming loop construct, said set of induction variable candidates including variables whose dependencies are included in said set of candidates and representing memory locations that may be modified by one of said tuples in said programming loop construct; and means for optimizing said flow graph, coupled to said generating means and said fourth determining means, using a compiler back end and said set of induction variable candidates.
Claim 10
Dependent Claim 428 words
A memory that is used in a computer system for compiling source programs, the memory comprising: means for generating a flow graph for a source program that is being compiled using a compiler front end which performs syntactic and semantic processing of a programming language, said flow graph comprising tuples, each tuple representing a single expression in said source program, said flow graph being a representation of said source program in an intermediate language; first determining means for determining, by said compiler front end for each tuple which can have an effect on another tuple and which is included in said flow graph, an effect indicator that represents an effect said each tuple has on said another tuple, said effect indicator being associated with said each tuple; second determining means for determining, by said compiler front end for each tuple which can have a dependency on another tuple and which is included in said flow graph, a dependency indicator that represents a dependency said each tuple has on said another tuple, said dependency indicator being associated with said each tuple; means for detecting a programming loop construct in said flow graph, said programming loop construct comprising one or more blocks in said flow graph, each of said blocks corresponding to a portion of said source program and including a sequence of tuples with no entry or exit between a first tuple and a last tuple of said sequence; third determining means, coupled to said detecting means and said first determining means, for determining a set of effects for each of said blocks comprising said programming loop construct by examining effect indicators that are associated with tuples in the sequence included in a corresponding block, each of said set of effects being associated with the corresponding block representing memory locations that may be modified by one of said tuples in said each corresponding block; fourth determining means, coupled to said third determining means and said second determining means, for determining a set of induction variable candidates for said programming loop construct by examining said sets of effects and dependency indicators, said dependency indicators being associated with tuples that are included in said programming loop construct, said set of induction variable candidates including variables whose dependencies are included in said set of candidates and representing memory locations that may be modified by one of said tuples in said programming loop construct; and means for optimizing said flow graph, coupled to said generating means and said fourth determining means, using a compiler back end and said set of induction variable candidates.
Claim 11
Dependent Claim 62 words
The memory of claim 8 wherein said optimizing means further comprises: means for updating said set of induction variable candidates by examining tuples in said sequence and eliminating a variable from said set of induction variable candidates when said variable does not conform to predetermined rules that define an induction variable; and means for using said first set to perform code optimizations.

References Cited (Backward Citations)

US4667290A Cited
US4642765A Cited
US4807126A Cited
US5109331A Cited
US4802091A Cited
US5067068A Cited
US5170465A Cited
US5182806A Cited
US5193191A Cited
US5201050A Cited
US5175856A Cited
US5493675A Cited

USPTO Annuity & Maintenance Windows

Annuity Stage Window Opens Payment Deadline Surcharge Period Until Estimated Fee Status
3.5 Years (Year 4) 1999-11-19 2000-05-20 2000-11-19 $2000.00 Window Closed / Lapsed
7.5 Years (Year 8) 2003-11-19 2004-05-20 2004-11-19 $3760.00 Window Closed / Lapsed
11.5 Years (Year 12) 2007-11-19 2008-05-20 2008-11-19 $7700.00 Window Closed / Lapsed

Assigned Categories & Tags

No categories assigned to this patent yet.

Assign Category Tag