Patent ID: 7574704

Claim:
A method, in a data processing system, for reorganizing computer code so as to prepare the computer code for application of optimization techniques, comprising: identifying a portion of the computer code that matches a coding style of interest, wherein the coding style of interest is one or more instruction loops that have a high frequency of execution and also have frequently executed blocks of instructions and rarely executed blocks of instructions; identifying one or more of the frequently executed blocks of instructions and one or more of the rarely executed blocks of instructions within the one or more instruction loops that have a high frequency of execution; removing the one or more of the rarely executed blocks of instructions from the portion of computer code; and appending the one or more of the rarely executed blocks of instructions to an end of the one or more instruction loops with a reference back to a beginning of the one or more instruction loops, wherein the one or more of the frequently executed blocks of instructions is maintained at the beginning of the one or more instruction loops to thereby generate reorganized computer code.