Patent ID: 6609249
Filing Date: 2003-08-19
Classification: G06F

Abstract:
A method for determining the maximum number of live registers in a computer system, said computer system having an executing computer program having at least one instruction that accesses said registers, said method including the steps of:including a read instruction in said instructions, said live registers being associated with said read instruction; associating events in said computer program with said instructions, and thereby associating said accessed registers with said events; wherein, for each said event, said method further comprises the steps of: identifying a number of accessed registers associated with said event that are live, and representing the number of live registers by a number_of_live registers variable; identifying a number of accessed registers about which information is known, and representing the number of accessed registers about which information is known by a registers_with_known_information variable; recording a register pressure information value associated with said event, said register pressure information value associated with said event including: (i) a number_of_live registers variable that represents a number of said accessed registers associated with said event that are live; and (ii) a registers_with_known_information value that represents a number of said accessed registers associated with said event about which information is known; when said registers_with_known_information variable represents registers that have not previously been touched with respect to said event; retaining a previously recorded register pressure information variable when a registers_with_known_information variable associated with said previously recorded register pressure information variable is equivalent to said registers_with_known_information variable included in said pressure information variable associated with said event; retaining a register pressure information variable with a largest value of said number_of_live_registers variable when (i) said number_of_live_registers variable has a different value than a number_of_live_registers variable included in a retained previously recorded register pressure information variable; and (ii) said registers_with_known_information variable is equivalent to a registers_with_known_information variable of said retained previously recorded register pressure information variable; retaining one said register pressure information variable associated with said event when a plurality of said register pressure information variables is associated with said event, and said number_of_live_registers variables and said registers_with_known_information variables included in each of said plurality of said register pressure information variables are equivalent; and determining a largest value of number_of_live_registers variables included in retained register pressure information variables associated with said events in said computer program and thereby identifying said maximum number of live registers in said computer system.