Determining maximum number of live registers by recording relevant events of the execution of a computer program6609249Abstract The present invention is a method and apparatus for compiler optimization that determines the maximum number of live computer registers, or pressure point. The present invention improves the productivity of a software developer by reducing compilation time of a computer program. More particularly, the overhead required during compilation to search information to determine the maximum number of live registers is reduced. The present invention records the relevant events related to the execution of a computer program, as opposed to a comprehensive history of the read instructions and write instructions. Also, the present invention maintains information about the maximum number of live registers for any partition related to the execution of a computer program. The present invention may bound the required system resources required to determine the maximum number of live registers to the number of registers associated with the number of partitions. Claims What is claimed is: Description FIELD OF THE INVENTION
TABLE 1
Live Range
instr 1: x = 100; .vertline. current live range of x
instr 2: y = 20; .vertline. current live range of x and y
instr 3: w = 50; .vertline. first write of w
instr 4: z = x - y; .vertline. current live range of x and y
instr 5: x = 200; .vertline. new live range of x begins
instr 6: w = 100; .vertline. second write of w
FIG. 4A is a flow diagram of a typical scenario of instruction events 430 (as shown in FIG. 2) that operate on registers 411 (as shown in FIG. 1A) and that include read instructions 208 and write instructions 208 (as shown in FIG. 2). Read instructions 208 are shown by the label "R" and write instructions 208 are shown by the label "W." Further, the events are labeled by numbers. For instance, as shown in element 402, events "2," "4," "7," "9," and "12" operate on the register 411 labeled "0." More particularly, events "2," "7," and "12" are write instructions 208, and elements "4" and "9" are read instructions 208. It will be appreciated, that in a computer system 100 (as shown in FIG. 1) the write and read instructions 208 operate on registers 411. As shown in element 404, events "6," "10," "11," and "12" operate on the register 411 labeled "1." As shown in element 406, events "1," "3," and "12" operate on the register 411 labeled "2." Finally, as shown in element 408, events "5", "8," and "12" operate on the register 411 labeled "3." Further as shown in element 410, time intervals 438 (as shown in FIG. 2) are identified by labels "A" through "L" that correspond to the time of an event 430 and reflect the progression of time from the time interval 438 labeled "A" to the time interval labeled "L." It will be appreciated that the final instruction 208 of each register 411 is defined to be a write instruction 208 thereby ensuring that a termination is found for the previous instructions 208 of each register 411. Therefore, in the present example, the event 430 labeled "12" is a write instruction 208 to each register 411. FIG. 4B is a block diagram that illustrates the information that the register pressure tool 102 maintains and manages, such as register pressure results 184 (as shown in FIG. 2). Recall that the register pressure tool 102 may operate in cooperation with the compilation system 108 or with the simulator 180 (as are shown in FIG. 1A). Therefore, the register pressure tool 102 may process information related to access of registers 411 (as shown in FIG. 1A) by values as a result of the operation of an event 430. As shown in element 430 an event is identified and information related to the level of uncertainty about the registers is stored, as shown in element 432. More particularly, the uncertainty level information 432 may include the registers_with_known_information variable 434, the number_of_live_registers variable 436, and the time interval variable 438 that is associated with the information. Therefore, the register pressure information may be referred to herein as an entry cell variable 437, or a register pressure information variable 437, that includes the event 430 and an associated uncertainty level variable 432, which includes the registers_with_known_information 434, the number_of_live_registers 436, and the time interval 438. By means of an example four registers 411, such as are discussed with reference to FIG. 4A, having current information associated with two of the registers 411 are associated with an uncertainty level 432 of two. That is, information is unknown about two of the four registers 411 under operation. The registers_with_known_information variable 434 may be referred to herein as having "register knowledge." Also, the time interval 438 may refer to the current time interval 438 or a previous time interval 438. Therefore, new current information may be added to information related to a previous time interval 438. It will be appreciated that a variety of notation methods may be used to represent the information managed by the register pressure tool 102. For purposes of explanation, the following notation will be used herein to represent information related to a scenario: ".sub.[register knowledge 434] [number_of_live_registers 436]; [time interval 438]," such as ".sub.0 1; T_B." It will be appreciated that the time interval 438 may be omitted in an alternate embodiment, without impacting the operation of determining the maximum number_of_live_registers 436 and the registers_with_known_information variable 434. For purposes of explanation consider a sample that includes four registers 411 and only the information about the register 411 labeled "0" is known, therefore the uncertainty level 423 is three. Also, the number_of_live_registers 436 is one, and the time interval 438 is "B." This sample may be represented by the following notation: ".sub.0 1; T_B." This notation will be stored in an entry cell 437 associated with an uncertainty of three. An entry cell 437 is used in the present embodiment to represent the register pressure information, such as a particular event 430 and the information related to the event 430. As shown in element 442, an event 430 may have information that is associated with a plurality of uncertainty levels 432. Also, as shown in element 440 there may be a plurality of events 430 associated with information that is maintained and managed by the register pressure tool 102. FIG. 4C is a flow diagram of the operation of the register pressure tool 102. For each event 430, as shown in element 480 each associated entry cell 437 (as shown in FIG. 4B) may be updated, as shown in element 484. A test of whether a register 411 (as shown in FIG. 1A) has been previously touched is completed, as shown in element 482. As used herein a register 411 may be "touched" when an instruction 208 accesses a register 411 and knowledge about that instruction 208 is maintained by the register pressure tool 102. It will be appreciated by those skilled in the art that a matrix may be used that maintains a record of whether a register 411 has been previously touched. Other means of managing the information related to whether a register 411 has been touched may be used without departing from the spirit of the present invention. For example as shown in Table 2, a data structure may be maintained that records "1" when a register 411 has been touched, and "0" when a register 411 has not been touched. Therefore, by maintaining a correspondence between the location of the values of "1" or "0" and the identification of a register 411, register 411 access information may be maintained. As shown in Table 2 registers 411 with labels "2" and "5" have not been touched as indicated by the associated "0." Registers 411 with labels "1," "3," and "4" have been touched as indicated by the associated "1." By means of an alternative example, different information may be stored that is associated with a register 411, such as a non-zero time stamp. Then, a register 411 would be identified as touched if the information associated with the register 411 is non-zero.
TABLE 2
Touched Register Matrix
Register Number: 1 2 3 4 5
Touched Value: "1" "0" "1" "1" "0"
In order to accumulate information about registers 411 in a computer system 100 (as shown in FIG. 1) at a particular time interval 438 (as shown in FIG. 4B), the register pressure tool 102 may add information about the registers 411 as the information becomes available. That is, the register pressure tool 102 may update information related to a particular time interval 438 as information about the state of a previously untouched register 411 becomes available, typically during a later time interval 438. Returning to FIG. 4C and when a register 411 has not been previously touched, as shown in element 482, the information related to the register 411 at the current time interval 438 is recorded, as shown in element 486. Then each entry cell 437 is scanned for the purpose of updating new register pressure information about the registers 411. As each entry cell 437 is accessed, a test is performed to determine if the new information is related to a register 411 that has been touched in a previous time interval 438, as shown in element 490. If the register 411 was previously touched as shown in element 494, the existing register information in the registers_with_known_information 434 is re-used. Alternatively, if the information did not exist for a particular register 411 in a previous time interval 438, as shown in element 492 the new information is combined with information from the previous time intervals 438, and the register is marked as touched. The operation of the register pressure tool 102 moves to element 496, from either element 492 or element 494. Each of the entry cells 437 are scanned and adjusted to reflect the updated uncertainty level 432 by use of the registers_with_known_information 434, as shown in element 496. Any shifting of information to the entry cell 437 that reflects the appropriate uncertainty level 432 is completed. That is, the scanning operation as shown in element 498, may include moving information in entry cells 437 to the appropriate entry cell 437, operating from the entry cell 437 reflecting the lowest uncertainty level 432 to the entry cell 437 reflecting the highest uncertainty level 432. Further, if any entry cells 437 related to the same event 430 have a different value of the number_of_live_registers 436 and the same register knowledge 434, the information related to the highest number_of_live_registers 436 is retained, as shown in element 491. Also, if the entry cells 437 related to the same event 430 have the same number_of_live_registers 436 and the same register knowledge 434, the information associated with one of the entry cells 430 is discarded, as shown in element 499. Table 3 below illustrates the information in the entry cells 437 representing the scenario illustrated in FIG. 4A and the operation of the register pressure tool 102 as illustrated in FIG. 4C. Therefore, as shown in element 486 of FIG. 4C and with respect to the first event 430 (as shown in FIG. 2), the initial level of uncertainty 432 is four and the corresponding entry cell 430 (as shown in row 1) is assigned the value ".sub.2 0; T_A." Since there are no entry cells 430 that have been assigned in a previous time interval 438 (as shown in FIG. 4B), the operation of the register pressure tool 102 moves to element 496 of FIG. 4C. Therefore, the information as shown in row 2, ".sub.2 0; T_A." is shifted to the cell corresponding to the first entry and an uncertainty level 432 of three. Recall that the time interval 438 may be omitted. Further illustrating the present embodiment in Table 3 below and moving to the sixth element 430, and as illustrated in element 486 in FIG. 4C, the new information ".sub.1 0; T_F" is recorded in the entry cell 437 associated with the sixth event 430 and an uncertainty level 438 of four (as shown in row 15). Then, as shown in element 492 of FIG. 4C, the new register information ".sub.1 0; T_F" (as shown in row 15) is combined with the existing information, ".sub.3 0; T_E" in the entry cell 430 corresponding to the fifth event 430 and an uncertainty level 430 of three (as shown in row 14), thereby resulting in the information ".sub.1,3 0; T_E," which is assigned to the entry cell 437 associated with the sixth event 430 and an uncertainty level of three (as shown in row 16). Also, the register 411 with the label "1" may be marked as touched. It will be appreciated that each entry cell 437 for each event 430 is operated on in a similar fashion as illustrated in elements 480, 484, and 496 of FIG. 4C. As illustrated in element 496 of FIG. 4C and as shown in the sixth element 430 of Table 3, the information ".sub.1 0; T_F" is shifted as shown in row 17 to the appropriate, uncertainty level 432 of three. The information ".sub.1,3 0; T_E" is shifted as shown in row 17 to the appropriate uncertainty level 432 of two. The information ".sub.0,1,3 0; T_D" is shifted as shown in row 17 to the appropriate uncertainty level 432 of one. Also, the information ".sub.0,1,2,3 2; T_C" is shifted as shown in row 17 to the appropriate uncertainty level 432 of zero. As illustrated in element 491 of FIG. 4C when two entry cells 437 have the same register knowledge 434 and different values of the number_of_live_registers 436, the information with the highest number_of_live_registers 436 is retained. Therefore as shown with respect to the tenth element in Table 3, the information ".sub.0,1,3 3; T_H," as shown in the entry cell 437 associated with row 29 and the uncertainty level of one, is retained instead of the information ".sub.0,1,3 1; T_F," as shown in the entry cell 437 associated with row 28 and the uncertainty level 432 of one, since the same register information, ".sub.0,1,3 " is associated with different values of the number_of_live_registers 436. That is the number_of_live_registers 436 of three is larger than one, and is retained. As illustrated in element 499 of FIG. 4C, when two entry cells 437 have the same register knowledge 434 and the same value of the number_of_live_registers 436, the information from one of the entry cells 430 is discarded. Therefore as shown with respect to the eighth element in Table 3, the information ".sub.0,1,3 1; T_F," as shown in the entry cell 437 in row 23 and associated with the uncertainty level 432 of one, is retained and the information ".sub.0,1,3 1; T_D," as shown in the entry cell 437 in row 22 and associated with the uncertainty level 432 of one, is discarded. As shown in element 479, the present embodiment determines the largest number_of_live_registers 436 for the executing program and thereby determines the global maximum value 204. That is, the present embodiment novelly maintains information about the global maximum value 204, and in the present example the global maximum value 204 is three and occurs at time interval H.
TABLE 3
Entry Cells for Scenario of FIG. 4A
UNCERTAINTY LEVEL
Row Event 4 3 2 1 0
1 1 .sub.2 0; T_A
2 1 .sub.2 0; T_A
3 2 .sub.0 0; T_B
4 2 .sub.2,0 0;T_A
5 2 .sub.0 0;T_B .sub.2,0 0; T_A
6 3 .sub.2 1; T_C
7 3 .sub.0,2 1; T_B .sub.0,2 0;T_A
8 3 .sub.2 1; T_C .sub.0,2 1; T_B
9 4 .sub.0 1; T_D
10 4 .sub.0,2 2; T_C .sub.0,2 1; T_B
11 4 .sub.0 1; T_D .sub.0,2 2; T_C
12 5 .sub.3 0; T_E
13 5 .sub.0,3 1; T_D .sub.0,2,3 2; T_C
14 5 .sub.3 0; T_E .sub.0,3 1; T_D .sub.0,2,3 2; T_C
15 6 .sub.1 0; T_F
16 6 .sub.1,3 0; T_E .sub.0,1,3 1; T_D .sub.0,1,2,3
2; T_C
17 6 .sub.1 0; T_F .sub.1,3 0; T_E .sub.0,1,3 1; T_D
.sub.0,1,2,3 2; T_C
18 7 .sub.0 0; T_G
19 7 .sub.0,1 0; T_F .sub.0,1,3 0; T_E .sub.0,1,3 1;
T_D
20 7 .sub.0 0; T_G .sub.0,1 0; T_F .sub.0,1,3 1; T_D
.sub.0,1,2,3 2; T_C
21 8 .sub.3 1; T_H
22 8 .sub.0,3 1; T_G .sub.0,1,3 1; T_F .sub.0,1,3 1;
T_D .sub.0,1,2,3 2; T_C
23 8 .sub.3 1; T_H .sub.0,3 1; T_G .sub.0,1,3 1; T_F
.sub.0,1,2,3 2; T_C
24 9 .sub.0 1; T_I
25 9 .sub.0,3 2; T_H .sub.0,3 1; T_G .sub.0,1,3 1;
T_F .sub.0,1,2,3 2; T_C
26 9 .sub.0 1; T_I .sub.0,3 2; T_H .sub.0,1,3 1; T_F
.sub.0,1,2,3 2; T_C
27 10 .sub.1 1; T_J
28 10 .sub.0,1 2; T_I .sub.0,1,3 3; T_H .sub.0,1,3 1;
T_F .sub.0,1,2,3 2; T_C
29 10 .sub.1 1; T_J .sub.0,1 2; T_I .sub.0,1,3 3; T_F
.sub.0,1,2,3 2; T_C
30 11 .sub.1 1; T_K
31 11 .sub.1 1; T_J .sub.0,1 2; T_H .sub.0,1,3 3; T_H
.sub.0,1,2,3 2; T_C
32 11 .sub.1 1; T_K .sub.0,1 2; T_H .sub.0,1,3 3; T_H
.sub.0,1,2,3 2; T_C
33 12 .sub.0 0; T_L
(Reg_0)
34 12 .sub.0,1 1; T_K .sub.0,1 2; T_H .sub.0,1,3 3;
T_H .sub.0,1,2,3 2; T_C
(Reg_0)
35 12 .sub.0 0; T_L .sub.0,1 2; T_H .sub.0,1,3 3; T_H
.sub.0,1,2,3 2; T_C
(Reg_0)
36 12 .sub.1 0; T_L
(Reg_1)
37 12 .sub.0,1 0; T_L .sub.0,1 2; T_H .sub.0,1,3 3;
T_H .sub.0,1,2,3 2; T_C
(Reg_1)
38 12 .sub.0 0; T_L .sub.0,1 2; T_H .sub.0,1,3 3; T_H
.sub.0,1,2,3 2; T_C
(Reg_1)
39 12 .sub.2 0; T_L
(Reg_2)
40 12 .sub.0,2 0; T_L .sub.0,1,2 2; T_H .sub.0,1,2,3
3; T_H .sub.0,1,2,3 2; T_C
(Reg_2)
41 12 .sub.2 0; T_L .sub.0,2 0; T_L .sub.0,1,2 2; T_H
.sub.0,1,2,3 3; T_H
(Reg_2)
42 12 .sub.3 0; T_L
(Reg_3)
43 12 .sub.2,3 0; T_L .sub.0,2,3 0; T_L .sub.0,1,2,3
2; T_H .sub.0,1,2,3 3; T_H
(Reg_3)
44 12 .sub.3 0; T_L .sub.2,3 0; T_L .sub.0,2,3 0; T_L
.sub.0,1,2,3 3; T_H
(Reg_3)
The present embodiment may alternatively also operate with information that is partitioned. For instance, partitioning may reflect specific ranges of time, or specific ranges of events, or a particular section of the code, such as an identified procedure. Therefore, when partitioning is used in the present embodiment, local maximum pressure points 206 associated with a partition 502 (as shown in FIG. 2) may be maintained in addition to the global maximum pressure point 204. FIG. 5A is a flow diagram of a typical scenario of instruction events 430 (as shown in FIG. 2) that operate on registers 411 (as shown in FIG. 1A) that include partitioning. As shown in element 512, events "2," "4," "7," and "9" operate on the register 411 labeled "0." More particularly, events "2," "7," and "9" are write instructions 208, and event "4" is a read instruction 208. As shown in element 514, events "6" and "9" operate on the register 411 labeled "1." As shown in element 516, events "1," "3," "8," and "9" operate on the register 411 labeled "2." Finally, as shown in element 518, events "5," and "9" operate on the register 411 labeled "3." Further as shown in element 520, time intervals 438 (as shown in FIG. 2) are identified by labels "A" through "I" that correspond to the time of an event and reflect the progression of time from the time interval 438 labeled "A" to the time interval 438 labeled "I." As shown in element 522 the partition 502 labeled "1" includes the time intervals 438 labeled "A" through "D," and the partition 502 labeled "2" includes the time intervals 438 labeled "E" through "I." Partitions will be represented herein as "P_[partition number]," such as "P.sub.-- 1." Partitioned Embodiment FIG. 5B is an alternative embodiment of the register pressure tool 102 and is a block diagram that illustrates the information that the register pressure tool 102 maintains and manages when the information is partitioned, such as register pressure results 184 (as shown in FIG. 2). Therefore, as shown in element 430 an event is identified and information related to the level of uncertainty about the registers is stored, as shown in element 432. More particularly, the uncertainty level information 432 may include the registers_with_known_information variable 434, the number_of_live_registers variable 436, the time interval variable 438 that is associated with the information, and the partition number variable 502 that is associated with the information. It will be appreciated that each partition number 502 may have unique information about the registers_with_known_information 434, the number_of_live_registers 436, and the time interval 438. Further, the entry cell 437 may include the event 430 and an associated uncertainty level 432, which includes the registers_with_known_information 434, the number_of_live_registers 436, the time interval 438, and the partition number 502. It will be appreciated that a variety of notation methods may be used to represent the information managed by the register pressure tool 102. For purposes of explanation, the following notation will be used herein to represent information related to a partitioned scenario: "[.sub.register knowledge 434] [number_of_live_registers 436]; [time interval 438]; [partition number 502]," such as ".sub.0 1; T_B; P.sub.-- 1." For purposes of explanation consider a sample that includes four registers 411, and only the information about the register 411 labeled "0" is known, therefore the uncertainty level 423 is three. Also, the number_of_live_registers 436 is one, the time interval 438 is "B," and the first partition is associated with the information. The sample may be represented by the following notation: ".sub.0 1; T_B; P.sub.-- 1." This notation will be stored in an entry cell 437 associated with uncertainty of three. FIG. 5C is an alternative embodiment and a flow diagram of the operation of the register pressure tool 102 when the information is partitioned. For each event 430, as shown in element 480 each entry cell 437 (as shown in FIG. 2) may be updated, as shown in element 484. A test of whether a register 411 (as shown in FIG. 1A) has been previously touched is completed, as shown in element 482. When a register 411 has not been previously touched, as shown in element 482, the register pressure information related to the register 411 at the current time interval 438 is recorded, as shown in element 486. Then each entry cell 437 is scanned for the purpose of updating new information about registers 411. As each entry cell 437 is accessed, a test is performed to determine if the new information is related to a register 411 that has been touched in a previous time interval, as shown in element 490. As shown in element 495, if the register 411 was previously touched and the information is associated with the represented partition 502 (as shown in FIG. 2), the existing information about registers_with_known_information 434 is re-used for the represented partition 502. Alternatively, if the information associated with a represented partition 502 in a previous time interval 438 does not exist for a particular register 411, as shown in element 493, the new information is combined with information from the previous, time interval 438 for the represented partition 502, and the register 411 is marked as touched. The operation of the register pressure tool 102 moves to element 496, from either element 493 or element 495. Each of the entry cells 437 are scanned and adjusted to reflect the updated uncertainty level 432 by use of the registers_with_known_information variable 434, as shown in element 496. Any shifting of information to the entry cell 437 that reflects the appropriate uncertainty level 432 is completed. That is, the scanning operation as shown in element 497, may include moving information in entry cells 437 to the appropriate entry cell 437, operating from the entry cell 437 reflecting the lowest uncertainty level 432 to the entry cell 437 reflecting the highest uncertainty level 432, while maintaining information about the registers 411 and their association with particular partitions 502. For each partition number 502, as shown in element 485, if any entry cells 437 related to the same event 430 have a different value of the number_of_live_registers 436 and the same register knowledge 434, the information related to the highest number_of_live_registers 436 is retained, as shown in element 487. Also for each partition number 502, if the entry cells 437 related to the same event 430 have the same value of the number_of_live_registers 436 and the same register knowledge 434, the information associated with one of the entry cells 430 is discarded, as shown in element 489. Table 4 below illustrates the information in the entry cells 437 related to the scenario that includes partitioning as illustrated in FIG. 5A, and the operation of the register pressure tool 102 as illustrated in FIG. 5C. Therefore, as shown in element 486 of FIG. 5C and with respect to the first event 430 (as shown in FIG. 2), the initial level of uncertainty 432 is four and the corresponding entry cell 430 (as shown in row 1) is assigned the value ".sub.2 0; T_A; P.sub.-- 1." Since there are no entry cells 430 that have been assigned in a previous time interval 438 (as shown in FIG. 4B), the operation of the register pressure tool 102 moves to element 496 of FIG. 4C. Therefore, the information ".sub.2 0; T_A; P.sub.-- 1" as shown in row 2 is shifted to the cell corresponding to the first entry and an uncertainty level 432 of three. Recall that the time interval 438 may be omitted. Further illustrating the present embodiment in Table 4 below by moving to the seventh element 430, and as illustrated in element 486 in FIG. 5C, the new information as shown in row 18, ".sub.0 0; T_G; P.sub.-- 2," is recorded in the entry cell 437 associated with the seventh event 430 and an uncertainty level 438 of four. Then, as shown in element 493 of FIG. 5C, the new register information ".sub.0 0; T_G; P.sub.-- 2" is combined with the existing information, ".sub.1 0; T_F; P.sub.-- 2" in the entry cell 430 (as shown in row 17) corresponding to the sixth event 430 and an uncertainty level 430 of three, thereby resulting in the information ".sub.0,1 0; T_F; P.sub.-- 2," (as shown in row 19) which is assigned to the entry cell 437 associated with the seventh event 430 and an uncertainty level of three. Also the register 411 with the label "0" may be marked as touched. As illustrated in element 496 of FIG. 5C and as shown in the seventh element 430 (as shown in row 20) of Table 4, the information ".sub.0 0; T_G; P.sub.-- 2" is shifted to the appropriate uncertainty level 432 of three. The information ".sub.0,1 0; T_F; P.sub.-- 2" is shifted to row 20 and to the appropriate uncertainty level 432 of two. The information related to an uncertainty level 432 of one that is associated with the seventh entry 430 (as shown in row 20) is related to both the partition 502 labeled "1" and the partition 502 labeled "2." Therefore, as shown in element 497 of FIG. 5C, the information ".sub.0,1,3 1; T_D; P.sub.-- 1" and ".sub.0,1,3 1; T_E; P.sub.-- 2" are both shifted to the appropriate uncertainty level 432 of one as shown in row 20. Also, the information ".sub.0,1,2,3 2; T_C; P.sub.-- 1" is shifted to the appropriate uncertainty level 432 of zero as shown in row 20. As illustrated in element 487 of FIG. 5C when two entry cells 437, have the same register knowledge 434 and different values of the number_of_live_registers 436, the information with the highest number_of_live_registers 436 is retained with respect to each partition number 502. Therefore as shown with respect to the third element in Table 4, as shown in row 8 the information ".sub.0,2 1; T_B; P.sub.-- 1" is retained instead of the information as shown in row 7, ".sub.0,2 0; T_A; P.sub.-- 1," since the same register information, ".sub.0,2 " is associated with different values of the number_of_live_registers 436. That is the number_of_live_registers 436 of one is larger than zero, and is retained. As illustrated in element 489 of FIG. 5C when two entry cells 437 have the same register knowledge 434 and the same values of the number_of_live_registers 436, the information from one of the entry cells 430 is discarded. Therefore as shown with respect to the eighth element in Table 4, as shown in row 23 the information ".sub.0,1,2,3 2; T_D; P.sub.-- 1" is retained and as shown in row 22 the information ".sub.0,1,2,3 2; T_C; P.sub.-- 1" is discarded. Therefore, the present alternate embodiment novelly maintains information about the local maximum values 206. As shown in element 478, the present embodiment determines the largest number_of_live_registers 436 associated with the partition 502, for the executing program, and thereby determines the local maximum value 206. In the present example the local maximum value 206 associated with the partition 502 labeled "1" is two and occurs at the time interval 438 labeled "D" and the time interval 438 labeled "C." Also the local maximum value 206 associated with the partition 502 labeled "2" is one and occurs at the time intervals 438 labeled "E," "F," "G," and "H."
TABLE 4
Entry Cells for Scenario of FIG. 5A Including Partitioning
UNCERTAINTY LEVEL
ROW EVENT 4 3 2 1 0
1 1 .sub.2 0; T_A;
P_1
2 1 .sub.2 0; T_A;
P_1
3 2 .sub.0 0; T_B;
P_1
4 2 .sub.2,0 0; T_A;
P_1
5 2 .sub.0 0; T_B; .sub.2,0 0; T_A;
P_A P_1
6 3 .sub.2 1; T_C;
P_1
7 3 .sub.0,2 1; T_B; .sub.0,2 0; T_A;
P_1 P_1
8 3 .sub.2 1; T_C; .sub.0,2 1; T_B;
P_1 P_1
9 4 .sub.0 1; T_D;
P_1
10 4 .sub.0,2 2; T_C; .sub.0,2 1; T_B;
P_1 P_1
11 4 .sub.0 1; T_D; .sub.0,2 2; T_; C;
P_1 P_1
12 5 .sub.3 0; T_E;
P_2
13 5 .sub.0,3 1; T_D; .sub.0,2,3 2; T_C;
P_1 P_1
14 5 .sub.3 0; T_E; .sub.0,3 1; T_D; .sub.0,2,3 2;
T_C;
P_2 P_1 P_1
15 6 .sub.1 0; T_F;
P_2
16 6 .sub.1,3 0; T_E; .sub.0,1,3 1; T_D; .sub.0,1,2,3
2; T_C;
P_2 P_1 P_1
17 6 .sub.1 0; T_F; .sub.1,3 0; T_E; .sub.0,1,3 1;
T_D; .sub.0,1,2,3 2; T_C;
P_2 P_2 P_1 P_1
18 7 .sub.0 0; T_G;
P_2
19 7 .sub.0,1 0; T_F; .sub.0,1,3 0; T_E; .sub.0,1,3 1;
T_D; .sub.0,1,2,3 2; T_C;
P_2 P_2 P_1 P_1
20 7 .sub.0 0; T_G; .sub.0,1 0; T_F; .sub.0,1,3 1;
T_D; .sub.0,1,2,3 2; T_C;
P_2 P_2 P_1 P_1
--
.sub.0,1,3 0; T_E;
P_2
21 8 .sub.2 1; T_H;
P_2
22 8 .sub.0,2 1; T_G; .sub.0,1,2 1; T_F; .sub.0,1,2,3
2; T_D; .sub.0,1,2,3 2; T_C;
P_2 P_2 P_1 P_1
--
.sub.0,1,2,3 1; T_E;
P_2
23 8 .sub.2 1; T_H; .sub.0,2 1; T_G; .sub.0,1,2 1;
T_F; .sub.0,1,2,3 2; T_D;
P_2 P_2 P_2 P_1
--
.sub.0,1,2,3
1; T_E;
P_2
24 9, .sub.0 0; T_I;
Reg_0 P_2
25 9, .sub.0,2 1; T_H; .sub.0,2 1; T_G; .sub.0,1,2 1;
T_F; .sub.0,1,2,3 2; T_D;
Reg_0 P_2 P_2 P_2 P_1
--
.sub.0,1,2,3
1; T_E;
P_2
26 9, .sub.0 0; T_I; .sub.0,2 1; T_H; .sub.0,1,2 1;
T_F; .sub.0,1,2,3 2; T_D;
Reg_0 P_2 P_2 P_2 P_1
--
.sub.0,1,2,3
1; T_E;
P_2
27 9, .sub.1 0; T_I;
Reg_1 P_2
28 9, .sub.0,1 0; T_I; .sub.0,1,2 1; T_H; .sub.0,1,2 1;
T_F; .sub.0,1,2,3 2; T_D;
Reg_1 P_2 P_2 P_2 P_1
--
.sub.0,1,2,3
1; T_E;
P_2
29 9, .sub.1 0; T_I; .sub.0,1 0; T_I; .sub.0,1,2 1;
T_H; .sub.0,1,2,3 2; T_D;
Reg_1 P_2 P_2 P_2 P_1
--
.sub.0,1,2,3
1; T_E;
P_2
30 9, .sub.2 0; T_I;
Reg_2 P_2
31 9, .sub.1,2 0; T_I; .sub.0,1,2 0; T_I; .sub.0,1,2 1;
T_H; .sub.0,1,2,3 2; T_D;
Reg_2 P_2 P_2 P_2 P_1
--
.sub.0,1,2,3
1; T_E;
P_2
32 9, .sub.2 0; T_I; .sub.1,2 0; T_I; .sub.0,1,2 1;
T_H; .sub.0,1,2,3 2; T_D;
Reg_2 P_2 P_2 P_2 P_1
--
.sub.0,1,2,3
1; T_E;
P_2
33 9, .sub.3 0; T_I;
Reg_3 P_2
34 9, .sub.2,3 0; T_I; .sub.1,2,3 0; T_I; .sub.0,1,2,3
1; T_H; .sub.0,1,2,3 2; T_D;
Reg_3 P_2 P_2 P_2 P_1
--
.sub.0,1,2,3
1; T_E;
P_2
35 9, .sub.3 0; T_I; .sub.2,3 0; T_I; .sub.1,2,3 0;
T_I; .sub.0,1,2,3 2; T_D;
Reg_3 P_2 P_2 P_2 P_1
--
.sub.0,1,2,3
1; T_H;
P_2
Alternative Embodiments The foregoing description, for purposes of explanation, used specific nomenclature to provide a thorough understanding of the invention. However, it will be apparent to one skilled in the art that the specific details are not required in order to practice the invention. In other instances, well known devices are shown in block diagram form in order to avoid unnecessary distraction from the underlying invention. Thus, the foregoing descriptions of specific embodiments of the register pressure tool are presented for purposes of illustration and description. They are not intended to be exhaustive or to limit the invention to the precise forms disclosed, many modifications and variations are possible in view of the above teachings. Those skilled in the art will recognize that changes may be made in form and detail without departing from the scope of the invention. The invention is limited only by the claims.
|
Same subclass Same class Consider this |
||||||||||
