The Commons

Back to Results

Patent Title: Method for removing invariant branches from instruction loops of a computer program

Assignee: IBM
Patent Number: US5202995
Issue Date: 04-13-1993
Application Number:
File Date:09-03-1992


Abstract: Removal of invariant branches from nests of loops results in an optimized computer program with increased speed of execution. To accomplish this objective, each loop of a program is then examined, looking at inner loops before their containing outer loops, to locate conditional branch instructions which are loop invariant. Each conditional branch which is evaluated based upon loop invariant calculations is rewritten, outside the outermost loop for which this branch is invariant. The moved branch is modified to branch around the loop in which it was originally contained if its condition is evaluated false. A new copy of the loop is made in which the invariant branch is rewritten as an unconditional branch. In the original copy of the loop, the invariant branch is deleted, and a branch is inserted after the modified original loop to skip around the new copy when the original copy is executed. Finally, any sections of the program which will never be executed as a result of the above described transformation are deleted.

Notes:

Link to USPTO

IBM Pledge dated 1/11/2005