Optimizing cobol object code instruction path length with respect to perform statements
First Claim
1. A method for execution on a digital computer for optimizing the instruction path length in the compilation of COBOL source code, said source code including PERFORM statements and preselected procedures associated therewith, an improvement comprising the steps of:
- (a) ascertaining the control transfer relationship among PERFORM statements and their associated procedures, and characterizing said ascertained relationship in a vector of attributes for each PERFORM statement including whether an associated procedure is OPEN or CLOSED; and
(b) interpreting the vectors such that if the vector for any given PERFORM statement indicates that;
(1) the procedure associated therewith is CLOSED, then the code constituting the procedure is substituted for the code constituting the PERFORM statement, or(2) the procedure associated therewith is OPEN, then a simplified transfer and return of control code is substituted for the original code constituting the transfer and return of control.
1 Assignment
0 Petitions
Accused Products
Abstract
A method for optimizing instruction path lengths in a compilation of COBOL source code with reference to PERFORM statements requires a two-step procedure in which the control transfer relationship among the PERFORM statements and associated procedures is characterized as a vector of attributes, and a second step in which the vectors are interpreted for any given PERFORM statement such that, where indicated, the code of the procedure or simplified linkage code will be substituted for the PERFORM statement.
-
Citations
3 Claims
-
1. A method for execution on a digital computer for optimizing the instruction path length in the compilation of COBOL source code, said source code including PERFORM statements and preselected procedures associated therewith, an improvement comprising the steps of:
-
(a) ascertaining the control transfer relationship among PERFORM statements and their associated procedures, and characterizing said ascertained relationship in a vector of attributes for each PERFORM statement including whether an associated procedure is OPEN or CLOSED; and (b) interpreting the vectors such that if the vector for any given PERFORM statement indicates that; (1) the procedure associated therewith is CLOSED, then the code constituting the procedure is substituted for the code constituting the PERFORM statement, or (2) the procedure associated therewith is OPEN, then a simplified transfer and return of control code is substituted for the original code constituting the transfer and return of control.
-
-
2. A method for execution on a digital computer for optimizing the instruction path length in the compilation of COBOL source code, said source code including at least two PERFORM statements sharing a preselected procedure associated therewith, an improvement comprising the steps of:
-
(a) ascertaining the control transfer relationship among the PERFORM statements and the shared associated procedure, and characterizing said ascertained relationship in a vector of attributes for each PERFORM statement including whether the shared procedure contains any externally specified labels within the body of the procedure; and (b) interpreting the vectors such that if the vector for any given PERFORM statement indicates both that the procedure does not contain said labels and that the object code size including any substituted for code would not exceed a predetermined size, then replacing the code constituting the procedure for the code of each associated PERFORM statement.
-
-
3. A method for execution on a digital computer for optimizing the instruction path length in the compilation of COBOL source code, said source code including at least two PERFORM statements such that one of the PERFORM statements is nested within a preselected procedure associated with the other PERFORM statement, each PERFORM statement having at least one preselected procedure associated therewith, an improvement comprising the steps of:
-
(a) ascertaining the nesting of PERFORM statements within their associated procedures, and characterizing said nesting in a called-by graph; and (b) substituting the procedure code or substituting a simplified call and return mechanism for each PERFORM statement in the COBOL source code in breadth-first order with respect to said called-by graph so that those PERFORM statements which are nested most deeply within the procedures associated with other PERFORM statements are compiled in depth-nested order.
-
Specification