US4833606A
Expired / Lapsed
US
⏱️ 0.0 years remaining
Compiling method for vectorizing multiple do-loops in source program
Assignee: Hitachi Ltd
•
Filing: 1987-10-07
•
Granted: 1989-05-23
•
Expires: 2007-10-07
Abstract
Abstract A compiling method is provided for vectorizing outer sides of multiple loops which are not tight. The method detects variables which are defined in one loop and referenced by another. The information, mapped into a dependence graph, is used to analyze the data dependency of each loop level and expand the source program. The value of the variable is substituted for an appropriate element of the array and the value of the appropriate element of the array is substituted for an original variable. The compiler inserts control statements to assure initial values and end values for the loops are preserved minimizing the size of the working arrays, and vectorizing multiple loops for each loop level.
Inventors
- 👤 Kyoko Iwasawa
- 👤 Yoshikazu Tanaka
Bibliographic Details
Application Number
—
Jurisdiction
US
Data Source
google_patents
Last Synchronized
2026-10-28 01:50
CPC Classifications
G; G06; G06F; G06F8/00; G06F8/40; G06F8/41; G06F8/45; G06F8/451; G06F8/452
Claims Analysis
Total Claims: 10
Claim 1
Independent Claim
208 words
A method for compiling a computer source program for execution on a machine which utilizes vector registers, comprising the steps of: (a) detecting loop control structures within the source program; (b) identifying variables common to a plurality of loop control structures and a function of the identified common variable within each loop control structure; (c) analyzing loop dependencies for a variable within a loop control structure; (d) mapping the identified common variables and the analyzed loop dependencies into a data dependence graph; (e) transforming the identified common variables in the data dependence graph into temporary arrays, the subscript of the temporary arrays having a predetermined relationship to the loop dependencies of the identified common variables; (f) inserting control statements into the source program to preserve the initial and final values of the transformed common variables at the start and end, respectively, of the loop control structures, the inserted control statements having a predetermined relationship to the identified function of the identified common variables; (g) moving the loop control structures containing the inserted control statements and the temporary arrays to eliminate the analyzed loop dependencies in the data dependence graph; and, (h) vectorizing the temporary arrays within the loop control structure which have had the analyzed loop dependencies eliminated.
Claim 2
Independent Claim
208 words
A method for compiling a computer source program for execution on a machine which utilizes vector registers, comprising the steps of: (a) detecting loop control structures within the source program; (b) identifying variables common to a plurality of loop control structures and a function of the identified common variable within each loop control structure; (c) analyzing loop dependencies for a variable within a loop control structure; (d) mapping the identified common variables and the analyzed loop dependencies into a data dependence graph; (e) transforming the identified common variables in the data dependence graph into temporary arrays, the subscript of the temporary arrays having a predetermined relationship to the loop dependencies of the identified common variables; (f) inserting control statements into the source program to preserve the initial and final values of the transformed common variables at the start and end, respectively, of the loop control structures, the inserted control statements having a predetermined relationship to the identified function of the identified common variables; (g) moving the loop control structures containing the inserted control statements and the temporary arrays to eliminate the analyzed loop dependencies in the data dependence graph; and, (h) vectorizing the temporary arrays within the loop control structure which have had the analyzed loop dependencies eliminated.
Claim 3
Dependent Claim
377 words
A computer-implemented compiling method for converting a source program into an object program, said object program including vector instructions to be executed by a vector processor, comprising the steps executed by a computer of: (a) detecting, among sentences belonging to a multiple DO Loop portion (FIG. 2A; FIG. 2D) of a source program, a first sentence (19 (FIG. 2A); 26 (FIG. 2D) which defines a value of variables and a second sentence (20 (FIG. 2A); 25 (FIG. 2B)) which uses the value of the variable, wherein the first sentence belongs to a portion outside of an inner DO loop within the multiple DO loop portion and the second sentence belongs to the inner DO loop; (b) modifying the multiple DO loop portion to form a single DO loop (DO 10 loop in FIG. 7A; DO 10 loop in FIG. 7D) and a modified DO loop portion (DO 11; DO 20loop portion in FIG. 7B or 7C) to be executed after the single DO loop, wherein the single DO loop comprises one or plural sentences belonging to the portion outside of the inner DO loop at the multiple DO loop portion of the source program, with the variables in the first sentence being replaced by one (TV1(1) in 19' (FIG. 7A); TV1(I+1) in 26' (FIG. 7D) of elements (TV1(1), I=1,N (FIG. 7A-7D)) of an array which one element has a subscript (I) which is dependent on a DO loop control variable (I) of an outer loop of the multiple DO loop portion of the source program and wherein the modified DO loop includes a third sentence (56 (FIG. 7A); 59 (FIG. 7B)) located before an inner loop of the modified multiple loop portion which third sentence uses one element belonging to the array so as to define a value of the variable by a value of the element and includes, inside an inner loop thereof, one or plural sentences belonging to the inner loop of the multiple DO loop portion of the source program; and (c) converting the single DO loop and the modified multiple DO loop portion into an object program to be executed by a vector processor, wherein the object program includes one or plural vector instructions corresponding to at least to the single DO loop.
Claim 4
Dependent Claim
377 words
A computer-implemented compiling method for converting a source program into an object program, said object program including vector instructions to be executed by a vector processor, comprising the steps executed by a computer of: (a) detecting, among sentences belonging to a multiple DO Loop portion (FIG. 2A; FIG. 2D) of a source program, a first sentence (19 (FIG. 2A); 26 (FIG. 2D) which defines a value of variables and a second sentence (20 (FIG. 2A); 25 (FIG. 2B)) which uses the value of the variable, wherein the first sentence belongs to a portion outside of an inner DO loop within the multiple DO loop portion and the second sentence belongs to the inner DO loop; (b) modifying the multiple DO loop portion to form a single DO loop (DO 10 loop in FIG. 7A; DO 10 loop in FIG. 7D) and a modified DO loop portion (DO 11; DO 20loop portion in FIG. 7B or 7C) to be executed after the single DO loop, wherein the single DO loop comprises one or plural sentences belonging to the portion outside of the inner DO loop at the multiple DO loop portion of the source program, with the variables in the first sentence being replaced by one (TV1(1) in 19' (FIG. 7A); TV1(I+1) in 26' (FIG. 7D) of elements (TV1(1), I=1,N (FIG. 7A-7D)) of an array which one element has a subscript (I) which is dependent on a DO loop control variable (I) of an outer loop of the multiple DO loop portion of the source program and wherein the modified DO loop includes a third sentence (56 (FIG. 7A); 59 (FIG. 7B)) located before an inner loop of the modified multiple loop portion which third sentence uses one element belonging to the array so as to define a value of the variable by a value of the element and includes, inside an inner loop thereof, one or plural sentences belonging to the inner loop of the multiple DO loop portion of the source program; and (c) converting the single DO loop and the modified multiple DO loop portion into an object program to be executed by a vector processor, wherein the object program includes one or plural vector instructions corresponding to at least to the single DO loop.
Claim 5
Dependent Claim
95 words
A compiling method according to claim 2, wherein, when the first sentence (19 (FIG. 2A)) is located before the inner DO loop of the multiple DO loop portion of the source program, the one element (TV1(I) in 19' (FIG. 7A)) of the array used to replace the variable and the one element (TV1(I) in 56' (FIG. 7A) of the array used by the third sentence (56) have a subscript (I) equal in value to a DO loop control variable (I) of the outer DO loop of the multiple DO loop portion of the source program.
Claim 6
Dependent Claim
130 words
A compiling method according to claim 2, wherein, when the first sentence (26, FIG. 2D) is located after the inner DO loop of the multiple DO loop of the source program the one element (TVI(I+1) in 26' (FIG. 7D)) of the array to replace the variable has subscript used to replace the variable has a subscript (I+1) next to the subscript (I) of the outer DO loop control variable (I) of the outer DO loop of the multiple DO loop of the source program and the one element (TV1(I) in 59 (FIG. 7D)) of the array used by the third sentence (59) has a subscript equal in value to a DO loop control variable (I) of the outer DO loop of the multiple DO loop portion of the source program.
Claim 7
Dependent Claim
387 words
A computer-implemented compiling method for converting a source program into an object program, said object program including vector instructions, to be executed by a vector processor, comprising the steps of: (a) detecting, among sentences belonging to a multiple DO loop portion (FIG. 2B; FIG. 2C) of a source program, a first sentence (22 (FIG. 2B); 23 (FIG. 2C)) which defined a value of a variable and a second sentence (21 (FIG. 2b); 24 (FIG. 2C)) which uses the value of the variable wherein the first sentence belongs to an inner DO loop (DO 20 loop in FIG. 2B or 2C) within the multiple DO loop portion and the second sentence is located outside the inner DO loop; (b) modifying the multiple DO loop portion to form a single DO loop (DO 11 loop in FIG. 7B or 7C) and a modified multiple DO loop portion (DO 10, DO 20 loops in FIG. 7B or 7C) to be executed before the single DO loop, wherein the single DO loop comprising one or pluraly sentences belonging to the portion outside of the inner DO loop of the multiple DO loop portion before modification by the step (b), with the variable in the second sentence being replaced by one (TV1(I) in 21' in FIG. 7B; TV(I) in 24' in FIG. 7C) of elements of an array which one element has a subscript (1) which is dependent on a DO loop control variable (1) of an outer loop of the multiple DO loop portion of the source program and wherein the modified multiple DO loop includes, after an inner loop of the modified multiple loop portion, a third sentence (57 (FIG. 7B); 58 (FIG. 7C)) which uses one element (TV1 (I+1) in 57 (FIG. 7B); TV1(I) in 58 (FIG. 7C)) belonging to the array so as to define a value of the element by a value of the variable, and includes, inside inner loop of the modified multiple loop, one or plural sentences belonging to the inner loop of the multiple DO loop portion of the source program; and (c) converting the single DO loop and the modified multiple DO loop portion into an object program to be executed by a vector processor, wherein the object program includes one or plural vector instructions corresponding at least to the single DO loop.
Claim 8
Dependent Claim
387 words
A computer-implemented compiling method for converting a source program into an object program, said object program including vector instructions, to be executed by a vector processor, comprising the steps of: (a) detecting, among sentences belonging to a multiple DO loop portion (FIG. 2B; FIG. 2C) of a source program, a first sentence (22 (FIG. 2B); 23 (FIG. 2C)) which defined a value of a variable and a second sentence (21 (FIG. 2b); 24 (FIG. 2C)) which uses the value of the variable wherein the first sentence belongs to an inner DO loop (DO 20 loop in FIG. 2B or 2C) within the multiple DO loop portion and the second sentence is located outside the inner DO loop; (b) modifying the multiple DO loop portion to form a single DO loop (DO 11 loop in FIG. 7B or 7C) and a modified multiple DO loop portion (DO 10, DO 20 loops in FIG. 7B or 7C) to be executed before the single DO loop, wherein the single DO loop comprising one or pluraly sentences belonging to the portion outside of the inner DO loop of the multiple DO loop portion before modification by the step (b), with the variable in the second sentence being replaced by one (TV1(I) in 21' in FIG. 7B; TV(I) in 24' in FIG. 7C) of elements of an array which one element has a subscript (1) which is dependent on a DO loop control variable (1) of an outer loop of the multiple DO loop portion of the source program and wherein the modified multiple DO loop includes, after an inner loop of the modified multiple loop portion, a third sentence (57 (FIG. 7B); 58 (FIG. 7C)) which uses one element (TV1 (I+1) in 57 (FIG. 7B); TV1(I) in 58 (FIG. 7C)) belonging to the array so as to define a value of the element by a value of the variable, and includes, inside inner loop of the modified multiple loop, one or plural sentences belonging to the inner loop of the multiple DO loop portion of the source program; and (c) converting the single DO loop and the modified multiple DO loop portion into an object program to be executed by a vector processor, wherein the object program includes one or plural vector instructions corresponding at least to the single DO loop.
Claim 9
Dependent Claim
96 words
A compiling method according to claim 5, wherein, when the second sentence (24 in FIG. 2C) is located after the inner loop of the multiple DO loop portion of the source program, the one element (TV1(I) in 24' in FIG. 2C) of an array used to replace the variable and the one element (TV1(I) in 58 (FIG. 7C)) used by the third sentence (58 (FIG. 7C)) have an element number (I) equal in value to a DO loop control variable (I) of the outer DO loop of the multiple DO loop portion of the source program.
Claim 10
Dependent Claim
129 words
A compiling method according to claim 5, wherein, when the second sentence (21 (FIG. 2B)) is located before the inner loop of the multiple DO loop portion of the source program, the one element (IVl(I +1) in 57 in FIG. 7B) of the array used by the third sentence (57) has a subscript (I+1) next to the subscript (I) equal in value to a DO loop control variable (1) of the outer DO loop of the multiple DO loop portion of the source program and the one element (TV1(I) in 58 (FIG. 7B)) of the array used to replace the variable has a subscript (I) equal in value to a DO loop control variable (I) of the outer loop of the multiple DO loop portion of the source program.
References Cited (Backward Citations)
US4374408A
Cited
US4330822A
Cited
US4435753A
Cited
US4437184A
Cited
US4456958A
Cited
US4466061A
Cited
US4468736A
Cited
US4463423A
Cited
US4567574A
Cited
US4692896A
Cited
US4710867A
Cited
US4710872A
Cited
USPTO Annuity & Maintenance Windows
| Annuity Stage | Window Opens | Payment Deadline | Surcharge Period Until | Estimated Fee | Status |
|---|---|---|---|---|---|
| 3.5 Years (Year 4) | 1992-05-22 | 1992-11-21 | 1993-05-23 | $2000.00 | Window Closed / Lapsed |
| 7.5 Years (Year 8) | 1996-05-22 | 1996-11-21 | 1997-05-23 | $3760.00 | Window Closed / Lapsed |
| 11.5 Years (Year 12) | 2000-05-22 | 2000-11-21 | 2001-05-23 | $7700.00 | Window Closed / Lapsed |