Patent ID: 8458679

Claim:
A method for propagating may-constants in program code input to a compiler comprising: determining variables that may be associated with a set of one or more constants in the program code; calculating execution flow probabilities for a set of one or more code segments of the program code that associate the variables with the set of one or more constants, wherein the execution flow probabilities are calculated based, at least in part, on flow data for the program code; determining that at least a first code segment of the set of one or more code segments has a first of the execution flow probabilities that exceeds a threshold, wherein the first code segment at least associates a first variable of the variables with a first of the set of one or more constants; propagating the first of the set of one or more constants associated with the first variable through the flow data to generate modified flow data based, at least in part, on said determining that at least the first code segment of the set of one or more code segments has a first of the execution flow probabilities that is high.