主权项 |
1. A method for decreasing an execution time of a computer code, the method comprising:
receiving, by one or more processors, a computer code; determining, by one or more processors, whether a first executed region of the computer code is executed frequently; responsive to a determination that the first executed region is executed frequently, determining, by one or more processors, whether a long-form conditional branch in the first executed region of the computer code is infrequently taken; responsive to a determination that the long-form conditional branch is infrequently taken:
generating, by one or more processors, a long-form unconditional branch with a target that is a target of the long-form conditional branch;modifying, by one or more processors, the long-form conditional branch to be a short-form conditional branch;inserting, by one or more processors, the long-form unconditional branch in the computer code within a branch distance of the short-form conditional branch; andmodifying, by one or more processors, a target of the short-form conditional branch to be a location of the long-form unconditional branch in the computer code. |