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

Complier code optimization method for a source program having a first and second array definition and use statements in a loop

Assignee: Hitachi Ltd
•
Filing: 1987-02-17
•
Granted: 1988-09-20
•
Expires: 2007-02-17
📄 Original PDF 🌐 Google Patents 🔄 Sync Now

Abstract

Abstract A dataflow analysis processing of a compiler is executed when a loop of a source program includes a first array definition statement determining a value of an element of an array and an array use statement using the value of the element of the array. Whether or not a second array definition statement exists in a path from the first array definition statement to the array use statement in the program and whether or not the second array definition statement may possibly rewrite the value of the array defined by the first array definition statement are judged by comparing the subscripts associated with the array definition and the array use. For a pair of each array definition statement and each array use statement, a step for generating array definition/use relationship data from the first array definition statement to the array use statement only when the possibility of the rewriting is present. In the program transformation processing, the program transformation processing is achieved only when the array definition/use relationship data contains only an array definition/use relationship for which the result of the program execution is not changed by the program transformation.

Inventors

  • 👤 Yasusi Kanada
  • 👤 Kazuhisa Ishida

Bibliographic Details

Application Number —
Jurisdiction US
Data Source google_patents
Last Synchronized 2026-10-27 18:23
CPC Classifications
G; G06; G06F; G06F8/00; G06F8/40; G06F8/41; G06F8/43; G06F8/433

Claims Analysis

Total Claims: 6
Claim 1
Independent Claim 24 words
A program translation method in a compiler for translating a source program into an object program through a sequence of the following processing of:
Claim 2
Dependent Claim 24 words
A program translation method in a compiler for translating a source program into an object program through a sequence of the following processing of:
Claim 3
Dependent Claim 324 words
(A) analyzing a lexical/syntax of the source program and then transforming the source program into a first program of an intermediate language suitable for a processing of the compiler; then and (B1) analyzing an order of execution of portions constituting the first program of the intermediate language and for obtaining control flow data representing a flow of an execution sequence; then and (B2) by using the control flow data, obtaining dataflow data representing definition/use relationships of variables and arrays appearing in the first program of the intermediate language; then and (B3) based on the dataflow data, transforming the first program of the intermediate language and then outputting a second program of the intermediate language having a higher execution performance; and then (C) converting the second intermediate-language program into an object program executable in a computer; wherein if a loop of the source program contains a first array definition statement determining a value of an array and an array use statement using the value of the array, the following steps are effected for a pair of said each array definition statement and said each array use statement in the loop: (a)(a1) judging whether or not a second array definition statement exists in a path from the first array definition statement to the first array use statement in the (B2) and whether or not the second array definition statement possibly rewrites the value of the array defined by the first array definition statement by comparing subscripts associated with the array definition and the array use, respectively; and then (a2) only if a possibility of a rewriting is present, generating array definition/use relationship data representing a definition/use relationship from the first array definition statement to the first array use statement, and then (b) only if the array definition/use relationship data includes only a definition/use relationship for which a result of a program execution is not changed by a transformation of the program, effecting a program transformation processing.
Claim 4
Dependent Claim 324 words
(A) analyzing a lexical/syntax of the source program and then transforming the source program into a first program of an intermediate language suitable for a processing of the compiler; then and (B1) analyzing an order of execution of portions constituting the first program of the intermediate language and for obtaining control flow data representing a flow of an execution sequence; then and (B2) by using the control flow data, obtaining dataflow data representing definition/use relationships of variables and arrays appearing in the first program of the intermediate language; then and (B3) based on the dataflow data, transforming the first program of the intermediate language and then outputting a second program of the intermediate language having a higher execution performance; and then (C) converting the second intermediate-language program into an object program executable in a computer; wherein if a loop of the source program contains a first array definition statement determining a value of an array and an array use statement using the value of the array, the following steps are effected for a pair of said each array definition statement and said each array use statement in the loop: (a)(a1) judging whether or not a second array definition statement exists in a path from the first array definition statement to the first array use statement in the (B2) and whether or not the second array definition statement possibly rewrites the value of the array defined by the first array definition statement by comparing subscripts associated with the array definition and the array use, respectively; and then (a2) only if a possibility of a rewriting is present, generating array definition/use relationship data representing a definition/use relationship from the first array definition statement to the first array use statement, and then (b) only if the array definition/use relationship data includes only a definition/use relationship for which a result of a program execution is not changed by a transformation of the program, effecting a program transformation processing.
Claim 5
Dependent Claim 330 words
A program translation method in a compiler for translating a source program into an object program through a sequence of the following processing of: (A) analyzing a lexical/syntax of the source program and then transforming the source program into a first program of an intermediate language suitable for a processing of the compiler; and then (B1) analyzing an order of execution of portions constituting the first program of the intermediate language and for obtaining control flow data representing a flow of an execution sequence; and then (B2) by using the control flow data, obtaining dataflow data representing definition/use relationships of variables and arrays appearing in the first program of the intermediate language; and then (B3) based on the dataflow data, transforming the first program of the intermediate language and then outputting a second program of the intermediate language having a higher execution performance; and then (C) converting the second intermediate-language program into an object program executable in a computer; wherein if a loop of the source program contains a first array definition statement determining a value of an array and an array use statement using the value of the array, the following steps are effected: (a) in the (B2), for each loop of the source program, (a1) judging whether or not subscripts of array references are equal to each other through a repetition of an execution of the loop, thereby obtaining array definition/use relationship data representing a definition/use relationship appearing during the repetition of the loop; and then (a2) judging whether or not the subscripts of the array references take a same value, thereby obtaining array definition/use relationship data representing a definition/use relationship appearing in another repetition of the loop, and then (b) in the (B3), judging whether or not the array definition/use relationship data contains only a definition/use relationship for which a result of a program execution is not changed by a transformation of the program, and effecting a program transformation processing only when the judgment result is true.
Claim 6
Dependent Claim 330 words
A program translation method in a compiler for translating a source program into an object program through a sequence of the following processing of: (A) analyzing a lexical/syntax of the source program and then transforming the source program into a first program of an intermediate language suitable for a processing of the compiler; and then (B1) analyzing an order of execution of portions constituting the first program of the intermediate language and for obtaining control flow data representing a flow of an execution sequence; and then (B2) by using the control flow data, obtaining dataflow data representing definition/use relationships of variables and arrays appearing in the first program of the intermediate language; and then (B3) based on the dataflow data, transforming the first program of the intermediate language and then outputting a second program of the intermediate language having a higher execution performance; and then (C) converting the second intermediate-language program into an object program executable in a computer; wherein if a loop of the source program contains a first array definition statement determining a value of an array and an array use statement using the value of the array, the following steps are effected: (a) in the (B2), for each loop of the source program, (a1) judging whether or not subscripts of array references are equal to each other through a repetition of an execution of the loop, thereby obtaining array definition/use relationship data representing a definition/use relationship appearing during the repetition of the loop; and then (a2) judging whether or not the subscripts of the array references take a same value, thereby obtaining array definition/use relationship data representing a definition/use relationship appearing in another repetition of the loop, and then (b) in the (B3), judging whether or not the array definition/use relationship data contains only a definition/use relationship for which a result of a program execution is not changed by a transformation of the program, and effecting a program transformation processing only when the judgment result is true.

References Cited (Backward Citations)

US4374408A Cited
US4567574A Cited
US4667290A Cited
US4642765A Cited

USPTO Annuity & Maintenance Windows

Annuity Stage Window Opens Payment Deadline Surcharge Period Until Estimated Fee Status
3.5 Years (Year 4) 1991-09-20 1992-03-21 1992-09-20 $2000.00 Window Closed / Lapsed
7.5 Years (Year 8) 1995-09-20 1996-03-21 1996-09-20 $3760.00 Window Closed / Lapsed
11.5 Years (Year 12) 1999-09-20 2000-03-21 2000-09-20 $7700.00 Window Closed / Lapsed

Assigned Categories & Tags

No categories assigned to this patent yet.

Assign Category Tag