Reducing the number of executed branch instructions in a code sequence
AssigneeHewlett-Packard Company
InventorsMichael S. Schlansker, Vinod Kathail
Life of this patent
Estimating the term…
Abstract
A compiler technique for reducing the number of executed branches in a code sequence. Multiple condition branch instructions in a program sequence are replaced with a single combined conditional branch instruction thereby eliminating the time-consuming execution of multiple branch instructions by a target processor.
Claims36
A computer-implemented method for reducing a number of executed branch instructions in an original code sequence, comprising the steps of:
- generating a set of instructions for determining a bypass branch condition by combining a plurality of branch conditions each for a corresponding branch instruction contained in the original code sequence;
- replacing the original code sequence with a compiled code sequence that includes the instructions for determining the bypass branch condition and that further includes a bypass branch instruction that depends on the bypass branch condition.
A computer-readable media including compiler program that reduces a number of executed branch instructions in an original code sequence, the computer program comprising:
- compiler code for generating a set of instructions for determining a bypass branch condition by combining a plurality of branch conditions each for a corresponding branch instruction contained in the original code sequence;
- compiler code for replacing the original code sequence with a compiled code sequence that includes the instructions for determining the bypass branch condition and that further includes a bypass branch instruction that depends on the bypass branch condition.
A computer apparatus for reducing a number of executed branch instructions in an original code sequence, comprising:
- means for generating a set of instructions for determining a bypass branch condition by combining a plurality of branch conditions each for a corresponding branch instruction contained in the original code sequence;
- means for replacing the original code sequence with an optimized code sequence that includes the instructions for determining the bypass branch condition and that further includes a bypass branch instruction that depends on the bypass branch condition.
A computer-readable storage media that contains a compiler program that when executed by a computer reduces a number of executed branch instructions in an original code sequence by performing the steps of:
- generating a set of instructions for determining a bypass branch condition by combining a plurality of branch conditions each for a corresponding branch instruction contained in the original code sequence;
- replacing the original code sequence with a compiled code sequence that includes the instructions for determining the bypass branch condition and that further includes a bypass branch instruction that depends on the bypass branch condition.
Dependencies are inferred from the claim text.