Method of reordering condition checks
AssigneeInternational Business Machines Corporation
InventorsTakuya Nakaike, Takeshi Ogasawara
Life of this patent
Estimating the term…
Abstract
Described is a computer-implemented method of reordering condition checks. Two or more condition checks in computer code that may be reordered within the code are identified. It is determined that the execution frequency of a later one of the condition checks is satisfied at a greater frequency than a preceding one of the condition checks. It is determined that there is an absence of side effects in the two or more condition checks. The values of the condition checks are propagated and abstract interpretation is performed on the values that are propagated. It is determined that the condition checks are exclusive of each other, and the condition checks are reordered within the computer code.
Claims20
A computer-implemented method of reordering condition checks, comprising:
- identifying two or more condition checks in computer code that can be reordered within the code;
- determining that a later one of the condition checks is satisfied at a frequency that is greater than the frequency at which a preceding one of the condition checks is satisfied;
- determining if there is an absence of side effects in the two or more condition checks;
- propagating values using an abstract interpretation to satisfy the condition checks;
- determining that the condition checks are exclusive of each other;
- and
- reordering the condition checks within the computer code using a hardware processor, wherein the reordering of the condition checks increases computer code processing speeds.
A system for transferring arrays of data objects by remote data memory access, comprising:
- one or more processors including memory that processes and stores computer code that includes two or more condition checks;
- a condition check frequency determiner that determines the frequency at which two or more condition checks are satisfied;
- a value propagator that propagates values using an abstract interpretation for evaluating the condition checks;
- and
- a condition check reorderer that reorders a later condition check and a preceding condition check that are found to be exclusive of each other.
A computer program product of reordering condition checks, the computer program product comprising a non-transitory computer readable storage medium having program instructions embodied therewith, the program instructions being executable by a computer to cause the computer to perform a method comprising:
- identifying two or more condition checks in computer code that can be reordered within the code;
- determining that a later one of the condition checks is satisfied at a frequency that is greater than the frequency at which a preceding one of the condition checks is satisfied;
- determining if there is an absence of side effects in the two or more condition checks;
- propagating values using an abstract interpretation to satisfy the condition checks;
- determining that the condition checks are exclusive of each other;
- and
- reordering the condition checks within the computer code, wherein the reordering increases computer code processing speeds.
Dependencies are inferred from the claim text.