Optimizer for program loops
First Claim
1. A computer implemented method for optimizing loops of a program, comprising the steps of:
- partitioning the program into a plurality of procedures, each procedure of said plurality of procedures including instructions related for execution;
constructing a program call graph for the program, said program call graph to indicate a flow of execution among said plurality of procedures;
identifying a specific one of said plurality of procedures as a dominating procedure, a dominating procedure being one of said plurality of procedures that calls any of said plurality of procedures more than once;
identifying a particular procedure of said plurality of procedures as a descendant procedure of said dominating procedure, said second procedure being called by said dominating procedure, said descendant procedure and said dominating procedure designated as a loop region;
identifying said descendant procedure as a step procedure when said descendant procedure is called by any of said plurality of procedures other than said dominating procedure and said descendant procedure;
removing said step procedure from said loop region.
3 Assignments
0 Petitions
Accused Products
Abstract
In a method for optimizing loops of a program, the program is partitioned into a plurality of procedures, each procedure including instructions related for execution. A program call graph is constructed for the program, the call graph indicating the flow of execution among the several procedures. A specific one of the procedures is identified as a dominating procedure if the specific procedure is executed more than once. Procedures called from the dominating procedure are identified as descendant procedures. The descendent and dominating procedures are designated as a loop region. Any of the descendant procedure which are called by any of procedures of the program other than the dominating procedure and the descendant procedure are identified as step procedures. Step procedures are removed from the loop region. Instructions of the loop region that do not change the execution state of the computer are removed from the loop region in a sequence as determined by the frequency of execution of such instructions.
56 Citations
7 Claims
-
1. A computer implemented method for optimizing loops of a program, comprising the steps of:
-
partitioning the program into a plurality of procedures, each procedure of said plurality of procedures including instructions related for execution; constructing a program call graph for the program, said program call graph to indicate a flow of execution among said plurality of procedures; identifying a specific one of said plurality of procedures as a dominating procedure, a dominating procedure being one of said plurality of procedures that calls any of said plurality of procedures more than once; identifying a particular procedure of said plurality of procedures as a descendant procedure of said dominating procedure, said second procedure being called by said dominating procedure, said descendant procedure and said dominating procedure designated as a loop region; identifying said descendant procedure as a step procedure when said descendant procedure is called by any of said plurality of procedures other than said dominating procedure and said descendant procedure; removing said step procedure from said loop region. - View Dependent Claims (2)
-
-
3. A computer implemented method for optimizing loops of a program to be executed in a computer system, comprising:
-
partitioning the program into a plurality of procedures; constructing a program call graph for the program; identifying dominating procedures of said plurality of procedures, each of said dominating procedures calling any of the plurality of procedures more than once; identifying descendant procedures of the dominating procedures, the descendant procedure being called via the dominating procedures; designating the descendant procedures and the dominating procedures as a loop region; identifying step procedures of the loop region, the step procedures being called by any of the plurality of procedures other than the dominating procedures and the descendant procedures; removing the step procedure from the loop region. - View Dependent Claims (4, 5, 6, 7)
-
Specification