← Back to Patent Explorer
US5493675A Expired / Lapsed US ⏱️ 0.0 years remaining

Compiler back end calling predetermined front end routines that use effect and dependency indicators to provide information to the compiler to determine the validity of an optimization

Assignee: Hewlett Packard Development Co LP
•
Filing: 1994-05-26
•
Granted: 1996-02-20
•
Expires: 2014-05-26
📄 Original PDF 🌐 Google Patents 🔄 Sync Now

Abstract

Abstract A compiler framework uses a generic "shell" and a generic back end (where the code generator is target-specific). The generic back end provides the functions of optimization, register and memory allocation, and code generation. The code generation function of the back end may be targeted for any of a number of computer architectures. A front end is tailored for each different source language, such as Cobol, Fortran, Pascal, C, C++, etc. The front end scans and parses the source code modules, and generates from them an intermediate language representation of the source code programs expressed in the source code. The intermediate language represents any of the source code languages in a universal manner, so the interface between the front end and back end is of a standard format, and need not be rewritten for each language-specific front end. A feature is a mechanism for representing effects and dependencies in the interface between front end and back end. An element has an effect if it writes to memory, and has a dependency if it reads from a location which some other node may write to. A mechanism which is independent of source language is provided for describing the effects of program execution.

Inventors

  • 👤 Robert N. Faiman, Jr.
  • 👤 David S. Blickstein
  • 👤 Steven O. Hobbs

Bibliographic Details

Application Number —
Jurisdiction US
Data Source google_patents
Last Synchronized 2026-10-30 16:55
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: 12
Claim 1
Independent Claim 238 words
A method executed in a computer system, the method comprising the steps: 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 programing 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 first 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 on said another tuple, said dependency indicator being associated with said each tuple; and optimizing said flow graph by a compiler back end calling one or more predetermined routines in said compiler front end, said predetermined routines using effect and dependency information from said determining effect and said determining dependency steps to provide return information to said compiler back end wherein said compiler back end uses said return information to determine whether an optimization is valid for one of said tuples comprising said flow graph.
Claim 2
Independent Claim 238 words
A method executed in a computer system, the method comprising the steps: 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 programing 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 first 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 on said another tuple, said dependency indicator being associated with said each tuple; and optimizing said flow graph by a compiler back end calling one or more predetermined routines in said compiler front end, said predetermined routines using effect and dependency information from said determining effect and said determining dependency steps to provide return information to said compiler back end wherein said compiler back end uses said return information to determine whether an optimization is valid for one of said tuples comprising said flow graph.
Claim 3
Dependent Claim 148 words
The method of claim 1 further comprising said compiler back end, during said optimizing step, using and modifying an effects stack that is managed by said compiler front end and that includes tuples stored in a predetermined order representing tuples that have effects on other tuples, the step of said compiler back end using and modifying said effects stack comprising: calling a first one of said predetermined routines that pushes a tuple with an associated effect indicator on said effects stack; calling a second one of said predetermined routines that returns, for a first tuple with an associated dependency indicator, a second tuple which is a topmost tuple on said effects stack and upon which said first tuple depends if said second tuple exists; and calling a third one of said predetermined routines that pops said effects stack by removing the topmost tuple with an associated effect indicator.
Claim 4
Dependent Claim 73 words
The method of claim 1 further comprising the step of said compiler back end calling a first one of said predetermined routines in said compiler front end to determine an effects class for a first one of said tuples included in said flow graph, said effects class representing memory locations that may be modified by said first tuple, said compiler front end using said effect indicator that is associated with said first tuple.
Claim 5
Dependent Claim 85 words
The method of claim 3 wherein said effects class is a first effects class, the method further comprising the step of said compiler back end calling a second one of said predetermined routines in said compiler front end to determine a second effects class for a second one of said tuples included in said flow graph, said second effects class representing memory locations upon which said second tuple may depend, said compiler front end using said dependency indicator that is associated with said second tuple.
Claim 6
Dependent Claim 107 words
The method of claim 4 wherein said flow graph comprises one or more blocks, each block corresponding to a portion of said source program and each block including a sequence of tuples with no entry or exit between the first tuple and the last tuple of said sequence, and the method further comprising the step of computing, by said compiler back end for a first one of said blocks, a basic block effects indicator by calling said first predetermined routine in said compiler front end, said basic block effects indicator representing memory locations that may be modified by a tuple which is included in said first block.
Claim 7
Dependent Claim 307 words
The method of claim 1 wherein said compiler front end is a first compiler front end, said flow graph is a first flow graph, said source program is a first source program, said programing language is a first programming language, said compiler back end is a common compiler back end used with a plurality of compiler front ends, the method further comprising the steps of: generating, using a second compiler front end, a second flow graph for a second source program that is being compiled using said second compiler front end which performs syntactic and semantic processing of a second programming language, said second flow graph comprising tuples and being a representation of said second source program in an intermediate language, each tuple in said second flow graph representing a single expression in said second source program, determining, by said second compiler front end for each tuple which can have an effect on anther tuple and which is included in said second 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 second compiler front end for each tuple which can have a dependency on another tuple and which is included in said second 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; and optimizing said second flow graph by said common compiler back end calling one or more predetermined routines in said second compiler front end to determine, by said common compiler back end, whether an optimization is valid for one of said tuples that comprises said second flow graph using effect and dependency information from said determining effect and determining dependency steps performed by said second compiler front end.
Claim 8
Dependent Claim 76 words
The method of claim 1, wherein said compiler back end includes an object module emitter that generates an object module for one of a plurality of different target computer systems, and the method further comprising the step of generating, in response to said optimizing step and using said object module emitter, an object module for one of a plurality of different target computer systems, said object module corresponding to said flow graph and said source program.
Claim 9
Dependent Claim 273 words
A memory for use in a computer system, said memory comprising: means for generating, using a first compiler front end, a first flow graph for a first source program, said first source program being compiled using said first compiler front end which performs syntactic and semantic processing of a first programming language, said first flow graph comprising tuples, each tuple representing a single expression in said first source program, said first flow graph being a representation of said first source program in an intermediate language; means for determining using said compiler front end an effect indicator for each tuple which can have an effect on another tuple and which is included in said first flow graph, said effect indicator representing an effect said each tuple has on said another tuple and being associated with said each tuple; means for determining, by said compiler front end a dependency indicator for each tuple which can have a dependency on another tuple and which is included in said first flow graph, said dependency indicator representing a dependence of said each tuple has on said another tuple and being associated with said each tuple; means for optimizing, coupled to said first and second determining means, said first flow graph by a compiler back end calling one or more predetermine routines in said compiler front end, said predetemined routines using effect and dependency information from said effect determining means and said dependency determining means to provide return information to said compiler back end wherein said compiler back end uses said return information to determine whether an optimization is valid for one of said tuples comprising said flow graph.
Claim 10
Dependent Claim 273 words
A memory for use in a computer system, said memory comprising: means for generating, using a first compiler front end, a first flow graph for a first source program, said first source program being compiled using said first compiler front end which performs syntactic and semantic processing of a first programming language, said first flow graph comprising tuples, each tuple representing a single expression in said first source program, said first flow graph being a representation of said first source program in an intermediate language; means for determining using said compiler front end an effect indicator for each tuple which can have an effect on another tuple and which is included in said first flow graph, said effect indicator representing an effect said each tuple has on said another tuple and being associated with said each tuple; means for determining, by said compiler front end a dependency indicator for each tuple which can have a dependency on another tuple and which is included in said first flow graph, said dependency indicator representing a dependence of said each tuple has on said another tuple and being associated with said each tuple; means for optimizing, coupled to said first and second determining means, said first flow graph by a compiler back end calling one or more predetermine routines in said compiler front end, said predetemined routines using effect and dependency information from said effect determining means and said dependency determining means to provide return information to said compiler back end wherein said compiler back end uses said return information to determine whether an optimization is valid for one of said tuples comprising said flow graph.
Claim 11
Dependent Claim 289 words
The memory of claim 8 wherein said compiler back end is a common compiler back end used with a plurality of compiler front ends, the memory further comprising: means for generating, using a second compiler front end, a second flow graph for a second source program, said second source program being compiled using said second compiler front end which performs syntactic and semantic processing of a second programming language, said second flow graph comprising tuples and being a representation of said second source program in an intermediate language, each tuple in said second flow graph representing a single expression in said second source program; means for determining, using said second compiler front end, an effect indicator for each tuple which can have an effect on another tuple and which is included in said second flow graph, said effect indicator representing an effect said each tuple has on said another tuple and being associated with said each tuple; means for determining, using said second compiler front end, a dependency indicator for each tuple which can have a dependency on another tuple and which is included in said second flow graph, said dependency indicator representing a dependency of said each tuple on said another tuple and being associated with said each tuple; and means for optimizing, coupled to said first and second determining means, said second flow graph by said common compiler back end calling one or more predetermined routines in said second compiler front end to determine whether an optimization is valid for one of said tuples that comprises said second flow graph, said second compiler front end using effect and dependency information from said effect determining means and said dependency determining means that use said second compiler front end.
Claim 12
Dependent Claim 76 words
The apparatus of claim 8, wherein said compiler back end includes an object module emitter that generates an object module for one of a plurality of different target computer systems, and the memory further comprising means for generating, coupled to said optimizing means and using said object module emitter, an object module for one of a plurality of different target computer systems, said object module corresponding to said first flow graph and said first source program.

References Cited (Backward Citations)

US4667290A Cited
US4951195A Cited
US5313614A Cited
US5119465A Cited
US5170465A Cited
US5182806A Cited
US5193191A Cited
US5201050A Cited
US5175856A Cited

USPTO Annuity & Maintenance Windows

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

Assigned Categories & Tags

No categories assigned to this patent yet.

Assign Category Tag