Method and apparatus for sequencing computer instruction execution in a data processing system
First Claim
1. A method for sequencing computer instructions for execution in a data processing system, the method comprising the steps of:
- (a) providing, within a memory, a computer program containing basic blocks wherein each basic block contains at least one computer instruction and the computer program contains many computer instructions;
(b) executing the computer program by reading the many computer instructions from memory and executing the many computer instructions via a central processing unit (CPU);
(c) storing, in the memory during the step of executing, a trace data file which indicates an execution order of the basic blocks, the execution order indicating when in time any basic block is executed with respect to other basic blocks, the execution order having a beginning and an end;
(d) selecting a sequence of M basic blocks from the trace data file to form a selected group, M being a finite positive integer greater than two;
(e) accumulating, in memory for the selected group, correlation information pertaining to the sequence of M basic blocks from the trace data file by scanning a selection window through the M basic blocks and correlating each of the M basic blocks to each M-1 other basic blocks in the sequence of M basic blocks;
(f) selecting a different sequence of M basic blocks as the selected group;
(g) repeating steps (e) through (g) until a selected number of sequences of M basic blocks in the trace data file are processed; and
(h) using the correlation information obtained via steps (e) through (g) to order the basic blocks for subsequent execution.
2 Assignments
0 Petitions
Accused Products
Abstract
A method and apparatus for sequencing computer instructions in memory (24) to provide for more instruction efficient execution by a central processing unit (CPU) (22) begins by executing the computer instructions via the CPU (22) and creating a trace file (FIG. 2) in memory (24). The trace file is then scanned using a window size greater than two (i.e., more than two instructions or basic blocks/ groups of instructions are selected as each window) and correlations are determined between several pairs of instructions in each window (FIGS. 9 and 10). The correlations obtained by the window procedure are then analyzed (FIG. 11) to determine an efficient ordering of computer instructions for subsequent execution by any target CPU.
137 Citations
33 Claims
-
1. A method for sequencing computer instructions for execution in a data processing system, the method comprising the steps of:
-
(a) providing, within a memory, a computer program containing basic blocks wherein each basic block contains at least one computer instruction and the computer program contains many computer instructions; (b) executing the computer program by reading the many computer instructions from memory and executing the many computer instructions via a central processing unit (CPU); (c) storing, in the memory during the step of executing, a trace data file which indicates an execution order of the basic blocks, the execution order indicating when in time any basic block is executed with respect to other basic blocks, the execution order having a beginning and an end; (d) selecting a sequence of M basic blocks from the trace data file to form a selected group, M being a finite positive integer greater than two; (e) accumulating, in memory for the selected group, correlation information pertaining to the sequence of M basic blocks from the trace data file by scanning a selection window through the M basic blocks and correlating each of the M basic blocks to each M-1 other basic blocks in the sequence of M basic blocks; (f) selecting a different sequence of M basic blocks as the selected group; (g) repeating steps (e) through (g) until a selected number of sequences of M basic blocks in the trace data file are processed; and (h) using the correlation information obtained via steps (e) through (g) to order the basic blocks for subsequent execution. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13)
-
-
14. A sequencer for sequencing computer instructions which are to be executed via a data processing system, the sequencer being stored on computer readable media and comprising:
-
computer instructions for initiating execution of a computer program stored in computer memory, the execution being performed by reading computer instructions which form basic blocks of computer code from computer memory and executing the computer instructions via a central processing unit (CPU); computer instructions for storing, in the computer memory while the execution is being performed, a trace data file which indicates an execution order of the basic blocks, the execution order indicating when in time any basic block is executed with respect to other basic blocks in the computer program, the execution order having a beginning and an end; computer instructions for iteratively choosing different sequences of partially overlapping M basic blocks from the trace data file to form selected groups of M basic blocks, M being a finite positive integer greater than two, and for each of the M basic blocks in each selected group accumulating, in memory for each selected group, correlation information between all pairs of the M basic blocks located within each selected group; and computer instructions for using the correlation information to sequence the basic blocks of the computer program in an execution order for execution by a computer. - View Dependent Claims (15, 16, 17)
-
-
18. A data processing system comprising:
-
a central processing unit (CPU); computer memory coupled to the central processing unit comprising; computer instructions for initiating execution of a computer program stored in computer memory, the execution being performed by reading computer instructions which form basic blocks of computer code from computer memory and executing the computer instructions via the central processing unit (CPU); computer instructions for storing, in the computer memory while the execution is being performed, a trace data file which indicates an execution order of the basic blocks, the execution order indicating when in time any basic block is executed with respect to other basic blocks in the computer program, the execution order having a beginning and an end; computer instructions for iteratively choosing different sequences of M basic blocks from the trace data file to form selected groups of basic blocks, M being a finite positive integer greater than two, and for each of the M basic blocks in each selected group accumulating in memory for each selected group, correlation information between each unique pair of the M basic blocks located within each selected group so that some basic blocks that do not lie directly adjacent each other in the trace data file are correlated to each other; and computer instructions for using the correlation information to sequence the basic blocks of the computer program in an execution order for execution by a computer.
-
-
19. A data processing system comprising:
-
means for initiating execution of a computer program stored in computer memory, the execution being performed by reading computer instructions which form basic blocks of computer code from computer memory and executing the computer instructions via a central processing unit (CPU); means for storing a trace data file in the computer memory while execution is being performed by the means for executing, the trace data file indicating an execution order of the basic blocks, the execution order indicating when in time any basic block is executed with respect to other basic blocks in the computer program, the execution order having a beginning and an end; means for iteratively choosing different sequences of M basic blocks from the trace data file to form selected groups of basic blocks, M being a finite positive integer greater than two, and for each of the M basic blocks in each selected group accumulating, in memory for each selected group, correlation information between each unique pair of the M basic blocks located within each selected group so that some basic blocks that do not lie directly adjacent each other in the trace data file are correlated to each other; and means for using the correlation information to sequence the basic blocks of the computer program in an execution order for execution by a computer.
-
-
20. A method for sequencing executable code and mass manufacturing the executable code onto computer readable media to improve computer performance, the method comprising the steps of:
-
initiating execution of a computer program stored in computer memory, the execution being performed by reading computer instructions which form basic blocks of computer code from computer memory and executing the computer instructions via a central processing unit (CPU); storing, in the computer memory while the execution is being performed, a trace data file which indicates an execution order of the basic blocks, the execution order indicating when in time any basic block is executed with respect to other basic blocks in the computer program, the execution order having a beginning and an end; iteratively choosing different sequences of M basic blocks from the trace data file to form selected groups of basic blocks, M being a finite positive integer greater than two, and for each of the M basic blocks in each selected group accumulating, in memory for each selected group, correlation information between each unique pair of two of the M basic blocks located within each selected group so that each selected group of basic blocks produces a plurality of correlation changes within the correlation information; using the correlation information to sequence the basic blocks of the computer program to form an executable sequenced computer program; and embodying the executable sequenced computer program on one or more computer readable media for execution by a computer. - View Dependent Claims (21)
-
-
22. A method for sequencing computer instructions for execution in a data processing system, the method comprising the steps of:
-
(a) providing, within a memory, a computer program containing basic blocks wherein each basic block contains at least one computer instruction; (b) executing the computer program by reading the basic blocks from memory and executing the basic blocks via a central processing unit (CPU); (c) storing, in the memory during the step of executing, a trace data file which indicates an execution order of the basic blocks, the execution order indicating when in time any basic block is executed with respect to other basic blocks, the execution order having a beginning and an end; (d) selecting a sequence of M basic blocks from the trace data file to form a selected group, M being a finite positive integer greater than two; (e) accumulating, in memory for the selected group, correlation information pertaining to the sequence of M basic blocks from the trace data file; (f) selecting a different sequence of M basic blocks as the selected group; (g) repeating steps (e) through (g) until a selected number of sequences of M basic blocks in the trace data file are processed; and (h) using the correlation information obtained via steps (e) through (g) to order the basic blocks for subsequent execution by selectively arranging the correlation information into at least one matrix (Wij), which has rows and columns, and analyzing the at least one matrix using matrix operations to determine an ordering of the basic blocks. - View Dependent Claims (23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33)
-
Specification